?
Solved

Making a file available for downloading

Posted on 1997-04-22
2
Medium Priority
?
159 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 200 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

771 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