Hi all,

I agree with you two, we should definitely support this feature for
FileRepresentation and even for any Representation.

See this new RFE for a proposition to add a "fileName" property to
Representtion. Let's continue the discussion using the comments system:
http://restlet.tigris.org/issues/show_bug.cgi?id=385

Best regards,
Jerome

> -----Message d'origine-----
> De : Rob Heittman [mailto:[EMAIL PROTECTED] 
> Envoyé : jeudi 22 novembre 2007 04:26
> À : [email protected]
> Objet : RE: Using FileRepresentation
> 
> 
> Have a look at what we recently did with the non standard, 
> but common and useful, httponly cookie parameter.  Jerome 
> introduced a function with a descriptive name that was not 
> tied to the specific non standard semantics, and could be 
> implemented differently in the future if there is a 
> standardized or better consensus way to do the same thing.
> 
> I agree content-disposition is currently ubiquitous for 
> downloading files to browsers.
> 
> 
> -----Original Message-----
> From: "Kevin Conaway" <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: 11/21/07 10:00 PM
> Subject: Re: Using FileRepresentation
> 
> Hi Thierry,
> 
> Thanks very much for your example.  I am not serving static content so
> unfortunately the Directory resource will not be of much use for me.
> 
> I find it odd that the Content-disposition header is not set. 
>   While it is
> not officially part of the HTTP standard, it is a header that 
> the entire web
> uses when serving files.
> 
> I think that Restlet is doing a disservice to its users by 
> forcing such an
> awkward workaround for such a common use case.
> 
> With your approval, I'm happy to work on a patch that would 
> set this header
> when using FileRepresentation.  Otherwise, I'm curious to 
> hear your reasons
> for not including it.
> 
> Thanks!
> 
> Kevin
> 
> On Nov 21, 2007 5:28 PM, Thierry Boileau <[EMAIL PROTECTED]> wrote:
> 
> > Hello Kevin,
> >
> > if you plan to serve static files, may Directory be what 
> you need, see
> > part06 of the tutorial
> > http://www.restlet.org/documentation/1.0/tutorial#part06.
> >
> > Otherwise, you can use the "content-disposition" header 
> (which is not
> > a standard header, see chapters 15.5 and 19.5 of the HTTP rfc
> > http://www.ietf.org/rfc/rfc2616.txt). I send you a sample 
> application
> > (2 classes).
> >
> > best regards,
> > Thierry Boileau
> >
> > On Nov 21, 2007 8:46 PM, Kevin Conaway 
> <[EMAIL PROTECTED]> wrote:
> > > What is the proper way to use FileRepresentation inside
> > > Resource.getRepresentation(Variant)?  I'd like to send 
> the user a file
> > if
> > > they browse to a certain URI.
> > >
> > > However, when I browse to that URI, it sends me the file, but the
> > original
> > > it doesn't send a filename with it.
> > >
> > > Also, why must I set an time to live on the representation? If I'm
> > sending
> > > the file to be downloaded, it should live as long as necessary.
> > >
> > > Thanks,
> > >
> > > Kevin
> > >
> >

Reply via email to