• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 161
  • Last Modified:

download files

I would like to make some files (.txt) available for download,
I've made a link to the documents (a href= etc)
this works fine on my pc, when the link is clicked,
you're asked whether you want to open the document or save it to disk,
this no longer works when my files have been uploaded to my server, what's wrong?
0
urko
Asked:
urko
1 Solution
 
urkoAuthor Commented:
Edited text of question.
0
 
spiderlegsCommented:
Most files made avalible are in ZIP A ZIP FOLDER.  You can download WINZIP, PUT YOUR TEXT FILES IN A ZIP FOLDER,  UPLOAD THE ZIP FOLDER AND MAKE A LINK THE THE FOLDER.

YOU CAN DOWNLOAD WINZIP AT:

http://www.winzip.com/downhome.htm

-hope that helps
0
 
rupertsCommented:
This is due to txt files being a recognised format by the browser, and therefore the browser can display them.

(This is the same for pictures (i.e *.jpg / *.gif)

Putting the file in a zip file is one solution, although there is some  javascript code which will force you to download a file. It is just 1 line, but I can't remember it! Prehaps someelse on EE can help!
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
stelogicCommented:
show me the html ...

i have done this and will check the code for you ..

either post it here or mail it to

stelogic@hotmail.com

later

steve
0
 
nettromCommented:
the browsers can display text files inline, in my opinion using a ZIP-file to get the download done would be cumbersome.  particularly when it comes to updating the site (provided there's quite a few text files you have on the site).

one solution would be to tell your users to either right-click on the link to the text file and choose "Save link as..." (or the equivalent), or choose "File, Save As..." or "File, Save" or hit Ctrl-S (or Alt-S or whatever's necessary) when they view the file.
0
 
urkoAuthor Commented:
good ideas from all of you, thanks,
after reading ruperts answer, i did the following:
I made a link to the .txt files,
pasted some java-code to open them in a new window,
visitors can then "download" or "save" the file by going to
"file"--"save as"--".txt" in their browser, (first lines of textfile
tell them to do so)

guess I'll be using some of the other answers for new sites in the future,
thanks again.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now