10968Re: [rest-discuss] Image thumbnails, URIs and content negotiation
- Jul 3, 2008Conneg could be used for this use case for non-HTML clients. However,
conneg is based on each of these representations having a different
media type, and you will need some extension to let the client
On Jul 3, 2008, at 12:46 AM, Stefano Masini wrote:
> how would you model an image archive where the client could retrieve:
> - images in their original format
> - thumbnails in different size (small, medium, large)
> I initially thought about a url scheme such as the following.
> - /images/<imageid>
> - /images/<imageid>/thumbnails/<size> (where <size> is "small",
> "medium" or "large")
> But then, on second thoughs, I considered the principle of content
> negotiation: should I consider a thumbnail just as a different
> representation of the same image? In this case I should probably use
> the sare URL for both cases, and specify a different Accept header.
> In the latter scenario though, I wouldn't be able to easily build an
> html page showing thumbnails, because html <img> tag simply doesn't
> allow to specify request headers in the "src" attribute, but simply a
> Maybe I just answered myself, but I was wondering if anybody had an
> opinion (or better yet, experience) on this matter.
- << Previous post in topic Next post in topic >>