Here is what i have used:

response.addHeader("Content-Disposition", "attachment; filename=\"" +
session.getAttribute("REPORT") + "\"")

when I right click to save as it offers up the name of the REPORT.

Ed

On Thu, Sep 22, 2011 at 7:11 AM, Iacopo <[email protected]> wrote:
> I did it....
> I found Content-Disposition: inline; filename="myfile.txt" and it
> works in dev mode, but doesn't when i deploy (cos the client doesn't
> ask the server about the content filename when i save)
> and Content-Disposition: attachment; filename="myfile.txt" which
> automatically opens a save dialog, which is not what i want....
>
> I cannot find other headers that could help me..... :(
>
>
>
> On Sep 22, 1:05 pm, Ed <[email protected]> wrote:
>> Take a look at response headers to set the name of the download
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Sep 22, 2011 at 6:59 AM, Iacopo <[email protected]> wrote:
>> > Hi everyone,
>> > i've set up my application in order to save a pdf file on the
>> > blobstore, then showing it on the application main page.
>>
>> > To show the PDF, i instantiate a Frame passing the url of the uploaded
>> > pdf.
>>
>> > The url is the location of the /serve servlet to which i add the image
>> > blobkey (so, in dev mode is something like
>> >http://127.0.0.1:8888/serve?file-path=cSi4Qi6BTg2w_g_mQ5KTYA).
>>
>> > Now, being this pdf a dowloadable file, the user should be able to
>> > save it simply through a right click-save as.
>> > But in the selection window that appears, the filename is always
>> > "serve" i.e. what is interpreted to be the file name coming from the
>> > frame src attribute.
>>
>> > Is there any way to save the file with his original filename? Any
>> > header on the serve response that i can use? Any dramatic change in
>> > the application i can make to solve the problem?
>>
>> > Thanks a lot!:)
>> > Cheers
>> > Iacopo
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "Google Web Toolkit" group.
>> > To post to this group, send email to [email protected].
>> > To unsubscribe from this group, send email to 
>> > [email protected].
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to