Solved

Making a file available for downloading

Posted on 1997-04-22
2
152 Views
Last Modified: 2013-12-25
I'm creating some forms (expense report, entertainment
approval, etc.) for the guys here at work. I want to
be able to put the names of the forms in our website
and have the guys just click on the name and the file
automatically downloads. I am using Netscape Gold 3.01.

We don't have an "FTP" site that can be accessed using
this method. I used the "a href" HTTP code and then I
went to Options-General-Helpers and added the suffix
"zip" and told it to "save to disk" whenever a file
ending in "zip" was clicked on. When I did that and I
clicked on the "zip" file, it took me to another web
page with a bunch of weird characters in it. I changed
the suffix to "xls" (it's an Excel file) and it did the
same thing with the same result.

What can I do to make this file downloadable so when the
person clicks on the file name, it will come back with
a "Save As" dialog box and prompt the user to save the
file to his disk.

Thanks,
Teri
0
Comment
Question by:teriking
2 Comments
 
LVL 4

Accepted Solution

by:
jshamlin earned 100 total points
ID: 1854115
The techniques you've used **should** work  - i.e. <A HREF="filename.zip">filename</A> should cause a user to be prompted to save the file to disk.

HOWEVER, your IPP (the company hosting your http server space) may have configured the MIME types to serve .zip or .xls or other file types diretly to the Web browser as text files.

And so, your "fix' would be to get in touch with your ISP and ask about the MIME configuration - explain what you're trying to do.

Problem is, the IPP might not be willing to configure its servers properly - by over-riding the ability to serve various file types, an IPP can coerce its users into buying FTP space - pretty shady practice. Or, if you want to imagine more honorable motives, an IPP may have configured its servers NOT to serve files of those kinds because they consume an inordinate amount of bandwidth - and how'd you like to be hosted on the same server as Zippy's Free game site, with freeloaders hogging the bandwidth to download files, which makes your Web pages inaccessible?

If your IPP won't correct their MIME configurations, you may need to switch to another IPP - you can get a pretty good deal on Web space these days (about 25 MB with your own domain names for about $300.00/an).  You'll still need a separate *access* account, but you'll have better control over your Web site (not to mention a broader array of services).

- S



0
 

Author Comment

by:teriking
ID: 1854116
I checked with my System Administrator, and she needs to get
the "exact" add-type line to be added, in order for it to
work (I have no idea what that means, personally). I received
another reply (from a newsgroup):

The suffix rules are only used if the server sends no Content-type, or a file is opened from disk. In order to get a download to disk, you will need to configure your server to send the appropriate content type and/or encoding (usually an AddType directive in the configuration file).

My SysAdmin's response to that is as follows:

That message doesn't make any real sense to me, however if you can get an EXACT add-type line that can be added, and the exact config file name (there are 4 config files for ncsa httpd)
I would be happy to add it for you. The only use for addtype lines that I know of is for server side includes, in the
srm.conf file, which i don't think is related.

Does this make sense, and is it do-able?

Thanks!
Teri
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now