Gossamer Forum
Home : Products : Gossamer Links : Discussions :

downloading file that was uploaded

Quote Reply
downloading file that was uploaded
Hello, I have my database set to allow uploads of files. One of the files ends in .Sims2Pack and when I click on the download link in the admin panel it pops up a window in internet explorer asking me whether I want to open it or save it. But when I click on the download link in the links detailed page it always trys to display it. How do I go about making it so that Links sql sends the file as a download in both the admin panel as well as in the links detailed page?

I've already set the servers mime type for the file to application/sims2pack with the file extension of .sims2pack but it still wants to display the file in the links detailed page instead of asking me what to do with the file.

Any help on this would be appreciated.

Thanks,
Quote Reply
Re: [kamidan] downloading file that was uploaded In reply to
I don't believe what the web server thinks the mime type of the file will affect what happens, since it's GLinks that's sending out the mime type header, not the web server.

Taking a look at the code, it looks like you can pass in v=1 or view=1 to make the code return headers to make it inline; or you can not pass those in and they should get a download prompt. How are you linking to the file on the user side?

Adrian
Quote Reply
Re: [brewt] downloading file that was uploaded In reply to
Im using a link like this:
Code:

<a href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>&view=upload">

If I change it to &v=1 or &view=1 then I get the Oops file does not exist message from Glinks.
Quote Reply
Re: [kamidan] downloading file that was uploaded In reply to
Try dl=upload or download=upload instead.

Adrian
Quote Reply
Re: [brewt] downloading file that was uploaded In reply to
Aaaaah! Thank you, download=upload works like I wanted it to.

Much thanks to you.

Smile