Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Offer files for DOWNLOAD only (not open it in browser)

Posted on 2002-05-29
11
Medium Priority
?
191 Views
Last Modified: 2010-08-05
hi!

does anybody know, if it is possible to have a webpage, where i offer files (.doc, .xls, .pdf, ...) for download, and this files are never displayed directly in the browser, but always offered for "save as" ...?!

thanks!
peter

0
Comment
Question by:OTPeter
[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
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 7041749
if you are using a simple hyperlink to the document like this:

<A href="myfile.xls">xls</a>

then your options are limited.  You could either put the file in a ZIP archive or you could rename the file to a different extension and provide instructions for the user to rename it back:

<A href="myfile_xls">download (rename this file to myfile.xls)</a>
0
 

Author Comment

by:OTPeter
ID: 7041758
thanks, but this is no suitable solution. I'd need a way to publish the files unzipped and in the original format.
I think this is unfortunately inpossible .....

g
peter
0
 
LVL 18

Accepted Solution

by:
bruno earned 300 total points
ID: 7041777
OTPeter,

we get this question a lot, and there is really no EASY way to do what you want.

There are TWO options I have seen.

1)  you can delete the MIME types from the server of the files you want the user to download.  Then, the server won't know what type of file it is, and will only offer a save as dialog.

2)  You can use scripting language to actually open the file, read the contents, and then stream the contents back the user



Neither is foolproof, neither is really easy.....

the easiest thing to do is just post a little message saying "please right click and choose 'save as'"



BRUNO
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Expert Comment

by:chops123
ID: 7041827
Well.. there is one crude way.Dont take it if you dont like it.

Store all your downloadable files in a folder with anonymous 'READ ONLY' access to that specific folder ONLY due to security reasons.

The purpose to have the files downloaded using ftp.

The procedure:The links on the files can be given in the foll.fashion:
ftp://anonymous@ftp.symantec.com/misc/americas/itools/vcafemac20pde/full/FullVC2.0.PDETrial.sea.hqx

When the user clicks on these files,it will ask the user the options to save/open etc.But you need to have your server configured for ftp access.

Rgds
KC


0
 
LVL 2

Expert Comment

by:chops123
ID: 7041845
If you want to hide the display of ftp://anonymous.... when the user hovers the mouse on the URL,see below:

Your code can be something like this:
----------------------------------------------------------

<a onmouseover="status='Download this file'; return true;" onmouseout="status='bye bye'; return true;" href="ftp://anonymous@ftp.symantec.com/misc/americas/itools/vcafemac20pde/full/FullVC2.0.PDETrial.sea.hqx">Download this file</a>

----------------------------------------------------------

Rgds
KC
0
 

Author Comment

by:OTPeter
ID: 7041864
sorry chops123,

both solutions are not what i need,

but bruno was faster ;)

thanks
greetings
peter
0
 
LVL 18

Expert Comment

by:bruno
ID: 7041870
chops,

interesting idea, haven't heard that one before...


Peter,

sorry there is no good way to do what you wanted...perhaps next time we'll be of more help.


BRUNO
0
 
LVL 2

Expert Comment

by:chops123
ID: 7041879
OTPeter..it doesnt matter

What matters when looking for a solution is looking at different means.One needs to experiment when developing,especially for the web.

Its never easy to come up with unique solutions.Solutions for the web will always be linked with some mystery and one needs to be open to experiment.

Rgds
KC
0
 
LVL 2

Expert Comment

by:chops123
ID: 7041889
OTPeter..it doesnt matter

What matters when looking for a solution is looking at different means.One needs to experiment when developing,especially for the web.

Its never easy to come up with unique solutions.Solutions for the web will always be linked with some mystery and one needs to be open to experiment.

Rgds
KC
0
 
LVL 2

Expert Comment

by:chops123
ID: 7041893
sorry for the duplicate post ... happenened accidently.. too much of experiment is also bad ;-)

KC
0
 

Author Comment

by:OTPeter
ID: 7041906
sorry chops123,

both solutions are not what i need,

but bruno was faster ;)

thanks
greetings
peter
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

705 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