You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "William C. Mount" <Mo...@cat.com> on 2005/11/17 19:44:54 UTC
[users@httpd] Default filename for downloading files.
Hello everyone,
I've got an apache 2 webserver that's sole purpose is to serve files for
downloading. My customer wants the ability to click on anyfile and in the
save window, have a default file name already exist.
for example, i have 5 files in the directory.
xxx.zip
yyy.zip
zzz.zip
aaa.zip
bbb.zip
Regardless of which file they click on, he wants the default file name in
the save window to be production-zipfile.zip
Is there anyway in apache 2 to do that?
Thanks in advance,
William C. Mount RHCE
J2EE Web Solutions CoEx
Global IT Solutions
Caterpillar Inc.
600 W. Washington St.
East Peoria IL, 61630
(309) 675-3031 - Desk
(309) 256-8099 - Cell
mountwc@cat.com
"I love the way Microsoft follows standards. In much the same manner that
fish follow migrating caribou."
-- Paul Tomblin
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Default filename for downloading files.
Posted by Joshua Slive <js...@gmail.com>.
On 11/17/05, William C. Mount <Mo...@cat.com> wrote:
> Hello everyone,
> I've got an apache 2 webserver that's sole purpose is to serve files for
> downloading. My customer wants the ability to click on anyfile and in the
> save window, have a default file name already exist.
>
>
> for example, i have 5 files in the directory.
>
> xxx.zip
> yyy.zip
> zzz.zip
> aaa.zip
> bbb.zip
>
>
> Regardless of which file they click on, he wants the default file name in
> the save window to be production-zipfile.zip
>
> Is there anyway in apache 2 to do that?
I know of two things you can do to help. You may need to combine the
two to get consistent results across browsers:
1. Set "AcceptPathInfo On"
and then instead of requesting http://yoursite.example.com/yyy.zip,
request http://yoursite.example.com/yyy.zip/production-zipfile.zip
2. Use mod_headers to send the Content-Disposition head with the
filename= option. Something like
Head Add Content-Disposition filename=production-zipfile.zip
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org