FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Downloading files, without internet renumbering...
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Downloading files, without internet renumbering... [message #169390 is a reply to message #169359] Thu, 09 September 2010 07:26 Go to previous messageGo to previous message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma:
Senior Member
El 08/09/2010 16:37, jodleren escribió/wrote:
> I have this simple script to download file frome anywhere. It gets a
> parameter and passes the file on.
> The problem is that files like ABC01234.nc works well.
> Then someone adds a version to is to it becomes ABC01234.2.nc - the .2
> got added causing my browser (?) to change it ABC01234[1].2.nc - the
> [1] bothers me.
>
> CanI get rid of that?

It's close to impossible to instruct Internet Explorer to download a
file with a specific name. Seriously. The best thing you can do is to lie:

1. Enable the URL rewriting module of your web server
2. Configure a redirection from

http://example.com/download/ABC01234.2.nc

to

http://example.com/download.php?filename=ABC01234.2.nc

You can still get a mangled name but there's not much else you can do.


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Php Switch Case
Next Topic: Re: Php code for ajax encoding
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 21:41:03 GMT 2024

Total time taken to generate the page: 0.03858 seconds