-
I recently put together a web page specifically to make available some files for a distant friend - they were 10 files created by a splitter program from one very large (7M) jpeg.
I used <A href="localfilename"> image </a> but when I tested it I found IE tried very hard to interpret the files in an attempt to display them. It tried to display the 1st file (which contained the original file jpeg header info) despite being called colin.jpg.001
My question is, is there a way in html to cause a file to be downloaded that specifically instructs the browser to make no attempt at displaying it, but just to offer it for download?
E.g. if I referenced a file called image.jpg the browser would (quite correctly) display the image therein, but suppose I wanted it to just be downloaded, not displayed?
I note that any file with the .zip extension is left alone by IE and immediately offerred for download. Is this what we have to do in every case just to get the browser to ignore the file contents?
-
I recently put together a web page specifically to make available some files for a distant friend - they were 10 files created by a splitter program from one very large (7M) jpeg.
I used <A href="localfilename"> image </a> but when I tested it I found IE tried very hard to interpret the files in an attempt to display them. It tried to display the 1st file (which contained the original file jpeg header info) despite being called colin.jpg.001
My question is, is there a way in html to cause a file to be downloaded that specifically instructs the browser to make no attempt at displaying it, but just to offer it for download?
E.g. if I referenced a file called image.jpg the browser would (quite correctly) display the image therein, but suppose I wanted it to just be downloaded, not displayed?
I note that any file with the .zip extension is left alone by IE and immediately offerred for download. Is this what we have to do in every case just to get the browser to ignore the file contents?
-
Hi Alan,
I had the same problem when downloading some JPEG images from the Hubble site.
This is because the browser recognises the .jpg extension and tries to do his job.
The easiest way around this is to simply invent an extension like .che and warn your friend that after downloading it, he has to go to properties>rename and the change the extension back to .jpg.
Windows will protest and say it'll become useless, but you and your friend know better.
Hope this helps. [img]/infopop/emoticons/icon_cool.gif[/img]
If you don't work against time, time often works for you.
-
Alternately, you can just right click on the image and chose SAVE AS. This allow you to download the image in question.
cfn ... Jen
Jen Worden
Web Developer
www.meadoworks.com
-
Ok thanks for that, I take that as a no, and we have to fiddle the file extension, except that it does not explain how my file colin.jpg.001 did not achieve the deception suggested.
-
It can avoid confusion to post to your site .zip file(s) you containing the jpg. You may find it isn't necessary to chop up the original 7mb jpg and thereby make it even easier for the recipient who downloads the .zip
Regards, Ross
<a href=http://www.designstop.com/>DesignStop.Com</a>
-
Remember this whatwashername virus? It had an extension .jpg.vbs People read jpg, but it was in fact a visual basic script, so everyone who uses windows, doesn't know how to program, but did install the scripting host, found his computer infected.
In your case though, .001, three numbers, will not be accepted as an extension, so jpg was seen as the format that had to be opened.
Ross, as jpg is already compressed, will you still gain a lot? I never tried.
As for a 7MB file: if this friend has a fast connection, it is a piece of cake. Even with a 56k, and early in the morning, it won't take more than half a hour.
Alan, your friend could install software like Getright to guide the download process, or install the Opera browser that is the fastest for downloading files I know of. I tried on my system with the three together, and Opera was already finished when IE and Netscape were only half-way.
If you don't work against time, time often works for you.
-
Sorry Alan, I guess I was being a bit obtuse! (hard day at the office [img]/infopop/emoticons/icon_wink.gif[/img] )
What I had in mind was putting the image(s) in question into a directory of their own without any html attached. Give the url to your friend ie. http://mydomain.com/pictures/ - this will give him access to the pictures as links.
Then he can right click on each image link and download them by using SAVE TARGET AS.
Hope that was a little more clear!
cfn ... Jen
Jen Worden
Web Developer
www.meadoworks.com
-
Ross
I certainly found that just renaming to .zip caused IE to ignore and treat it as a download.
Erik
Your logic on the .001 explanation is believable but I just didn't credit IE with that much intelligence! I was interested to read about Opera, may try it one day.
Jen - yes, thanks.
Thanks to you all - very interesting.