Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Download links does not work
- This topic has 24 replies, 8 voices, and was last updated 11 years, 9 months ago by Micha_AC.
-
AuthorPosts
-
June 12, 2011 at 12:15 am #27381amin007Participant
I am surprised that NextGen gallery is renaming the file with a “.jpg_backup” extension which is not a valid image file extension but this should not be the end of the road.
Open the “lib/mimetype.php” file from eStore plugin and search for the following line of code:
"jpg" => "image/jpeg",
Once you find it just add another line below with so it looks like the following:
"jpg" => "image/jpeg",
"jpg_backup" => "image/jpeg",This will tell the browser that this weird “.jpg_backup” extension should be treated as an image file and the download should work fine. Let me know how you go.
June 12, 2011 at 9:34 am #27382juliendizdarMemberI have tested to download a file with .jpg_backup
Customer can’t read this file on osx , windows XP, vista and seven (tested this morning)
There are 7 months that nextgen gallery has made this change …
.jpg_backup is not a file for user of nextgen.
.jpg_backup only permit to restore original file instead of resized image in nextgen.
There are 2 solutions :
1°) you publish hack, for modify nextgen
for exemple, when you save you file the picture renamed nameofpicture_backup.jpg
instead of nameofpicture.jpg_backup
2°) you modify estore to be compatible with the evolution of nextgen gallery.
your script automatically rename all the picture will be downloaded…
I wait with impatience your reply.
Thanks
June 13, 2011 at 2:24 am #27383amin007ParticipantHow will the operating system be able to read a “.jpg_backup” file extension? This is not a valid file extension which is why it can’t read it. That doesn’t mean eStore is not doing what it is supposed to do which is download the exact file from your server to the clients computer as it is. Remember, when you open that file in a browser it can read the image file so when you save it it saves it as a .jpg file and hence you can open the file in your OS. WP eStore is not an image reader… its job is to download the file securely from sellers server to customer’s computer! All you have to do is rename the “.jpg_backup” file to “.jpg” after you download it to your computer and the operating system will be able to read it fine.
With that said, I have now added an option in eStore which will check for file names with “.jpg_backup” and change the save as name to “.jpg_backup.jpg”. To enable this option open the “download.php” file of eStore plugin and search for the following line of code:
//$file_name = eStore_perform_save_as_file_name_massaging($file_name);
Once you find it, change it to the following:
$file_name = eStore_perform_save_as_file_name_massaging($file_name);
June 13, 2011 at 9:13 am #27384juliendizdarMemberHello,
First, thank you for your work.
I think we’re close to a perfect solution.
This extension is not very clean :
.jpg_backup.jpg
– estore must copy the .jpg_backup file or files (because it necessary not changed nextgen gallery) and rename it with clean name when customer buy it.
June 13, 2011 at 9:22 am #27385juliendizdarMember1°) copy .jpg_backup
2°) rename for exemple prefix_name_of_file_suffix.jpg
it necessary to use another name that name_of_file.jpg
because it name of resized file in nextgen gallery.
Thank for your help
June 13, 2011 at 9:52 am #27386juliendizdarMember[http://phpweby.com/software/filerenamer]
June 14, 2011 at 12:45 am #27387amin007ParticipantLook inside the following function in the “download.php” file. Apply your renaming preference for the file however you want it:
eStore_perform_save_as_file_name_massaging
Alternatively, use the following option:
Open the “eStore_advanced_configs.php” file and search for the following line of code:
define('WP_ESTORE_ENABLE_ADVANCED_NGG_FILE_SERVE', false);
Once you find it change it to the following:
define('WP_ESTORE_ENABLE_ADVANCED_NGG_FILE_SERVE', true);
This will make it to where eStore will first look for the “.jpg_backup” version of the image at the time of download and serve that one to the customer if it finds it.
February 2, 2013 at 9:48 pm #27388Micha_ACMemberHello, my problem is:
I want to create a picture-shop. The URL of the preview picture is
[www.x/x/1.jpg]
the URL of the original picture is
[www.x./x/1.jpg_backup]
I want the customers are able see the preview pictures, buy them and then get a link from the script to the original picture. If i get it correctly the script renames, in the buying process, the 1.jpg_backup in 1.jpg and offers the customer to download the original picture
My Problem is that the customers only get the link to the preview version, the original picture wont be created/renamed.
This is my log file:
[02/02/2013 9:19 PM] – Status : Using advanced NextGen Gallery file serve option. File to look for: [http://x/x/1.jpg_backup]
[02/02/2013 9:19 PM] – Status : Save as file name: 1.jpg
[02/02/2013 9:19 PM] – Status : Unresolved DL file path = [http://x/x/1.jpg]
[02/02/2013 9:19 PM] – Status : Resolved DL file path = /x/x/1.jpg
[02/02/2013 9:19 PM] – Status : Dispatching DL method = 1
[02/02/2013 9:19 PM] – SUCCESS : DL completed with no server-side errors detected.
in the folder are following files:
x/x/1.jpg (preview version)
x/x/1.jpg_backup (original version)
ive changed the WP_ESTORE_ENABLE_ADVANCED_NGG_FILE_SERVE’ function in true and i am using the following phrase in the download.php
Please help me!
Excuse me, my english is really bad but i hope you get it!
Im using the actual versions of NGG and WP Estore. Thank you very much
February 4, 2013 at 12:22 am #27389adminKeymasterHi, You didn’t mention what version of eStore plugin you are using. Please tell me which version you are currently using.
February 6, 2013 at 11:16 am #27390Micha_ACMemberI found the error! It was a incompatible plugin – BPS Security. This plugins saves a htaccess-file in the root-dir … After I’ve changed ist, the download-links worked correctly!
-
AuthorPosts
- You must be logged in to reply to this topic.