mblond Posted December 3, 2002 Posted December 3, 2002 I am trying to use the downloads portion of the website to download images. I can't seem to get this to work. I can download text files, pdf files etc ... but image files are perhaps being saved in the wrong format? -- not sure as the image extension is still correct *.jpg etc... However the box that prompts for saving the file shows as text file. When an image file is downloaded it can not be opened, there is simply an incompatible format error. Any ideas or help to resolve this problem would be greatly appreciated. Thank you, Michael
Ajeh Posted December 3, 2002 Posted December 3, 2002 I'd zip them ... :shock: When I tried it, I get the image pulled up on the screen from the /pub/temp_generated_directory
mblond Posted December 3, 2002 Author Posted December 3, 2002 I'd zip them ... :shock: Thank you, That's right this would work :D good idea, zipping is a solution that would solve the immediate problem. In order to zip the image dynamicly (eg: when user clicked on download) I suppose something like gzip would work ? I would like to adapt some of the code to incorporate both zipped file and regular image file download. Is download.php the file that controls the physical download the file or is there another file that is responsible for this ? When I tried it, I get the image pulled up on the screen from the /pub/temp_generated_directory hmmm... I was placing the image in the default download directory, is there perhaps a better structure for images that you would recommend? As a minimum I will try creating a seperate location outside the downloads file for image download. thank you for your help, someday I will return the favor... I hope :) . Michael
mblond Posted December 3, 2002 Author Posted December 3, 2002 Ok here's another solution: (If anyone else has this same problem) In the Admin: 1) turn off "download by redirect" the images will be downloaded in the proper format, without any error.
Ajeh Posted December 3, 2002 Posted December 3, 2002 That's a crafty fix ... granted I am not sure the pros and cons of it as I always use the redirect method. I am afraid I do not know the ins and outs of dynamically compressing the file. But assume the casual user just got lost as soon as you change that to a gzip instead of their friendly, everyday zip file ... :shock: The /includes/modules/downloads.php manages the download itself. NOTE: if you have an older snapshot, that use to be located in /includes/boxes/downloads.php
mblond Posted December 3, 2002 Author Posted December 3, 2002 That's a crafty fix ... granted I am not sure the pros and cons of it as I always use the redirect method. I will be running some tests soon and will post the results -- if there are any substantial changes. I am afraid I do not know the ins and outs of dynamically compressing the file. But assume the casual user just got lost as soon as you change that to a gzip instead of their friendly, everyday zip file ... :shock: From what I've read Gzip is just another server side (Linux) zipping utility I'm not sure of the details, but programming it shouldn't be too difficult (famous last words) :wink: The idea is to make this transparant to the customer and have a choice of downloading zip or regular. The /includes/modules/downloads.php manages the download itself. NOTE: if you have an older snapshot, that use to be located in /includes/boxes/downloads.php Ok I have a snapshot that is only about a week old. Oh an after thought..., I am using your "Downloads Controller V5.0" will this make any difference ? (for editing download) I also notice that there are multiple copies of downloads.php in different directories, is the /includes/modules/downloads.php the only one that manages the download itself ? Many thanks Linda, Back to the grindstone....
Ajeh Posted December 3, 2002 Posted December 3, 2002 Just the one file is used to control things. My changes to it mainly are whether or not the file can be downloaded, based on payment method. Most everything is documented in there with a // BOF: WebMakers.com Added: and an // EOF: WebMakers.com Added so you can kind of follow along with what the heck I think I am doing in the code ... :shock:
mblond Posted December 3, 2002 Author Posted December 3, 2002 Great! thanks for clearing the fog, Linda. I now just have to muddle my way through the haze. Michael
Recommended Posts
Archived
This topic is now archived and is closed to further replies.