Solved

Making a file available for downloading

Posted on 1997-04-22
2
156 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

685 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