Bookmark Topic Watch Topic
  • New Topic

HTTP Header question

 
Shane Burgel
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Report post to moderator
Is there a header that can specify the file name?

I have a file with the following headers:

Content-Type=application/download
Content-Disposition=attachment

but I also want to specify the filename dynamically for the file when it is downloaded so I need a header that I can use to set the file name.

Thanks for your help
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Report post to moderator
Shane!.. This is servlet realted question, i'm moving this to servlet forum.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Report post to moderator
Try "Content-disposition: attachment; filename=MyFile.txt"
 
Shane Burgel
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thanks that worked but that begs another question. Is there a way to specify the download location for the file? Is there a way I can specify a header to say that the default download directory should be say C:\Temp ?
[ May 13, 2004: Message edited by: Shane Burgel ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
To prevent duplicate conversations, this thread is continued here.

I'll close this copy.
Dave.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!