Solved

Making a file available for downloading

Posted on 1997-04-22
2
158 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
The viewer will learn how to count occurrences of each item in an array.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

724 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