View Full Version : file download problem!!!!
hi! i uploaded a file to my FTP that isnt PHP or HTML or anything and isnt meant to open a new page but to be downloaded by the surfer. Buuuut, when i click the button, it opens a blank page instead of a download box showing up!!
is there some kind of code i can apply to the link that will always make sure that when the link is clicked, the file can only be downloaded, so that a new blank page isnt opened up??
heeeeelpp!!
thanx
lmf33
08-20-2005, 06:51 PM
Put the file in a zip folder and then upload the zip folder to your server.
<a href="http://www.yourdomain.com/nameoffile.zip">Download</a>
no sir, still doesnt work ... for some reason it doesnt allow me to upload .zip files
takes me to a 404 page not found
how else can I get around this, i tried changing the .zip file extension to .jpg and then uploading it, it worked ..... then i tried renaming the file back to a .zip exntension and that didnt work ...
i also tried this: <a href=" javascript: download("LatestPlayList.wpl");">, but still doesn't work!!!! and I also tried it without the file expension
<a href=" javascript: download("LatestPlayList");"> no work ...
any new ideas are appreciated
thank you ..
darco9x2
08-20-2005, 11:51 PM
do rar files work? also, try the allowed extensions for your server. zip may not be allowed.
I don't think much of your host.
lmf33
08-21-2005, 10:31 AM
The only file extensions I know of that you click on to download is exe, zip, and tar.gz. Jpg and gif's are graphics and to download them you just put the image on your page and then do a right click and ''Save picture As''.
Or you can look for a new host that allows you to upload zip files.
How a file is handled by the browser depends not on the extension, but the Content-Type: header. Anything the browser doesn't recognize is assumed to be application/x-octet-stream. If you could persuade your server to serve that file up as application/x-octet-stream, it would be downloaded rather than shown. I would agree with lmf33 when s/he advises you to get a new host, though. One expects limitations on a free host, but when they start limiting your filetypes, it's time to move out.
P.S. lmf33: in a .tar.gz file, technically the extension is .gz. .tar is considered as part of the filename. When running tar -czf, the file is first tarred, which essentially sticks the files together, creating one file the same size as all the original files put together. This file is then gzip'ed. Any file can be gzip'ed; however, gzip can only handle one file. Thus, multiple files must be tarred first. From this we get .tar.gz. The .tar doesn't actually mean anything; until it is gunzip'ed, it isn't a tarfile.
lmf33
08-22-2005, 11:22 AM
Thanks Twey. I just learned about that file when I downloaded a script that was a .gz. My computer will extract zip files but not this one, so winzip did it.
A good utility to extract common UNIX archives on Windows is WinRAR. See http://www.rarlabs.com/ .
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.