Loading ...
Sorry, an error occurred while loading the content.

10968Re: [rest-discuss] Image thumbnails, URIs and content negotiation

Expand Messages
  • Subbu Allamaraju
    Jul 3, 2008
    • 0 Attachment
      Conneg 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
      negotiate.

      On Jul 3, 2008, at 12:46 AM, Stefano Masini wrote:

      > Hello,
      >
      > 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.
      > Respectively:
      > - /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
      > url.
      >
      > Maybe I just answered myself, but I was wondering if anybody had an
      > opinion (or better yet, experience) on this matter.
      >
      > Thanks
      > Stefano
      >
      >
    • Show all 7 messages in this topic