ZenphotoCMS Forum
Is it possible to force a download? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Is it possible to force a download? (/thread-1012.html)



Is it possible to force a download? - jayray999 - 2006-12-24

I am currently using the following code for my DOWNLOAD button.

" title="">download

This prompts a password (.htaccess) and if the password is correct it displays the image in its own page where one can Right Click, Save As etc.

However, some of my users are unaware of even such simple tricks as Right Click and Save As so I am wondering if the DOWNLOAD link can directly prompt a "Save Image" type dialog box? Also can such an action be browser independent?

Thanks a lot.




Is it possible to force a download? - trisweb - 2006-12-25

It's got something to do with the mime type...

Check here, looks good
http://actionscript.org/forums/showthread.php3?t=89784




Is it possible to force a download? - jayray999 - 2006-12-27

I tried adding this in the section of image.php of my theme:

And it resulted in the following errors:

[Removed as requested]




Is it possible to force a download? - trisweb - 2006-12-31

It'd have to be the headers in the actual JPEG image sent by the server; that might require that PHP streams the image content as zenphoto did in versions prior to 1.0.2, right now it just redirects, which I believe reloads the headers.

Not sure if there's a way, but if anything it'd be done in i.php




Is it possible to force a download? - pearofducks - 2007-01-06

i got this working another way, if you are interested i can share.
http://iphoto.advancedpants.com




Is it possible to force a download? - jayray999 - 2007-01-07

very interested. please share




Is it possible to force a download? - jayray999 - 2007-01-07

i just saw your site; it really works.




Is it possible to force a download? - jayray999 - 2007-01-11

@pearofducks

Still waiting for the trick you used. I notice it shows the full path to the file being downloaded. Can that be insecure?




Is it possible to force a download? - mgupta02 - 2007-01-25

@pearofducks

can you send me the down.php at my email id mgupta02@gmail.com

Pls Help me out with it.




Is it possible to force a download? - jayray999 - 2007-01-25

@pearofducks

Please could you post the code? It would really help. Thanks.