Is there HTML code to enable...

User 528054 Photo


Registered User
209 posts

I have a file at my site that people download, but it involves windows right click and save etc.... sometimes it shows
up only as to download the html file..... not the actual file for the wiring diagram I display.

Is there anything I can do with code, that I can use as a no fuss "download this diagram" link ?

Thankyou
Peter
User 38401 Photo


Senior Advisor
10,951 posts

you could use winzip or winrar or your favorite compression utility and post it that way. Most people (unfortunately not all but a lot more these days than it used to be hehe) know how to extract a file.

I see it this way... if they are able to right click, save image to... and then find the thing after they saved it... then they are able to extract something too usually.

So just zip it up and put a link to it under the little thumbnail graphic that says something like " click image to load larger image to copy and save or download in zip format here" and make the word "here" be a link to the zip file.

I might also suggest that you create an actual html page with your large graphic on it instead of letting it be just a graphic link, and put a spot maybe on the right with instructions (step by step) to copying and saving the graphic that way too :)
User 1975414 Photo


Registered User
10 posts

This interested me, as I had wondered about it before (and only just remembered that I had as I read this!)

I found this morning:-

"Those who understand HTTP know that the web server returns several "headers" along with every object downloaded by the web browser. The best known of these is Content-type:, which tells the browser what kind of file it is dealing with: a web page (Content-type: text/html), a GIF image (Content-type: image/gif), and so on.
A lesser-known header, Content-disposition:, can be used to tell the browser what should be done with the file. By default, the browser will "dispose" of the object by displaying it in the browser or launching an appropriate external player, whichever is appropriate. But when Content-disposition: is set to attachment; filename=movie.mpg, the browser instead displays a "open, save or cancel" dialog box, inviting the user to save the file under the name movie.mpg. The default may be to open the file in an external player, but that does not happen automatically, and the user is given a clear "save" option in both major browsers. "

http://www.boutell.com/newfaq/creating/ … nload.html

I have't tried this yet, but I'll give it a try at some point this week. If I didn't post it here, I would forget where I found it! it's easier to read on that webpage itself that my copied text above.

JB
A signature you say? No idea...

first site is: www.taylorianproductions.com
User 38401 Photo


Senior Advisor
10,951 posts

Interesting, thanks for the info JB, I'll go read that tomorrow too as I'd be interested in a way to do that also :)
User 1975414 Photo


Registered User
10 posts

Works fine for me, but I'm in .php now rather than html. Was very simple - changing the link and creating a new .php page. Sweet!

Not sure if there's an easy way in HTML, but this works fine.

A lucky find, I can take no credit!

JB
A signature you say? No idea...

first site is: www.taylorianproductions.com
User 1995300 Photo


Registered User
31 posts

the mime type should be added for that file type. This is done in your web server configuration. If you have no access to that or do not know how to change/add to it, then just zip the file and it will download when a person clicks on it.
User 318771 Photo


Ambassador
13 posts

Did anyone think to convert the file to a PDF? Once a PDF file, the download is simple. This is especially good if a picture or diagram. Plus, PDF files are as universal as Flash has become.
User 1975414 Photo


Registered User
10 posts

Good thinking Ed.

Some browsers will open a .pdf within the browser though, and getting people to understand 'do the save-as thing' is just as hard as 'right click'!

The Rehearsals page of the site in my sig has all the info on, with a downloadable pdf if any of the cast or crew want it. I've aimed this site at theatricals though, who are more arty than techy!

JB

(by the way - nice rack in your picture. I understand that may mean something else in the US, so I apologise! Is that a wireless case for band sound, or an server array? Either way - cool!)
A signature you say? No idea...

first site is: www.taylorianproductions.com
User 1524122 Photo


Registered User
25 posts

Okay... If I understand the above (which I really don't... but am learning fast)...

I would have to create a .php file for EACH .mp3 file (presuming it's an audio .mp3 file) on the page and link to each .php file as the link?! Am I correct? Unfortunately, even looking at the BOUTELL.COM page, there isn't a page set up that I can look at to see how it really works. Remember, the magician doesn't look as smart once how the trick is done is known (or in otherwords, there's nothing behind the curtain... pay no attention).

I'm using VSD and have a page I've created where a .mp3 can be played via a javascript player I've embedded for each file... another link for downloading a .pdf with info on the file (opens in a new window)... but need to use this feature to allow the participant to DOWNLOAD the file only (without it opening in this or another window). Yes --- I know it would be easier to put a "right click to download" comment on the page, but I want to keep it clean and simple and idiot proof (and yes, we've all met the perfect idiots).

If anyone knows a simplier way of doing it while keeping the file in its native (.mp3) format (NOT an .rar or .zip), I'm open to suggestion.

Thank you all for your indulgence and help!
User 38401 Photo


Senior Advisor
10,951 posts

PDF's will always Open if the person clicking the link has a PDF Reader installed which most people do. That's the default nature of PDF files when in links. Nothing you can do to change that behavior other than zip them up for download or tell people to right click to download. Most people also know that when a PDF file opens there's always a menu at the bottom that allows you to save it so either way it has the downloadability built in whether it opens the file or they right click it to download it.

Unfortunately that's basically your options, let them open, put a text box that says Right Click the PDF link to download, or zip it up.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.