Re: Customer Uploaded Files - List and Download
Re: Customer Uploaded Files - List and Download
I would contact your webhost.... have then look to see that it is being stored correctly or is it corrupted on upload
Also try the download on another computer to see if it the device you are on with the issue
Re: Customer Uploaded Files - List and Download
Does this work with version 1.5.4? I can't get it to work.
Re: Customer Uploaded Files - List and Download
Quote:
Originally Posted by
decartwr
I haven't had time to thoroughly investigate this (and it's almost midnight my time, so fatigue is working against me here)...BUT, it does appear that the uploads.php code assumes file extensions will always be lowercase, which is bogus.
See if these changes help:
Around line 229 of uploads.php, find a line like this:
Code:
$file_extension = strtolower( substr( strrchr( $fileName, '.' ), 1) );
and change it to be like this:
Code:
$file_extension = strtolower( $fext = substr( strrchr( $fileName, '.' ), 1) );
and then around line 249 find:
Code:
$fs_path = DIR_FS_UPLOADS . $index . '.' . $file_extension;
and change it to:
Code:
$fs_path = DIR_FS_UPLOADS . $index . '.' . $fext;
and then (optionally, only if you want to preserve the case of the extension when you download the file) around 256 find:
Code:
$nfile = 'zc_order' . $oid . '_' . $index . '.' . $file_extension;
and change it to:
Code:
$nfile = 'zc_order' . $oid . '_' . $index . '.' . $fext;
I have NOT tested these mods, but try them and post results here (being on opposite sides of the world is a challenge, time-wise).
Thanks for this! i was looking for this solution a long time, wondering why it is not implemented in the newer version by default. you may want to link to this support thread on the add-on page as well.
Another suggestion would be (perhaps a s a separate plugin) to turn the file attribute data shown on the orders.php to a link so that the file can be directly downloaded on the order page.
Thanks for the great mod!
Re: Customer Uploaded Files - List and Download
Just installed this on a new zencart installation version 1.5.5f and php 5.6. no upload link shows up in admin panel. Any ideas?
Re: Customer Uploaded Files - List and Download
If you install the previous version (Version 1.3) first, then overwrite with 1.4, the the page shows up fine. From what I can tell, it HAS to have the extra_datafiles (admin->includes->extra_datafiles) included, and 1.4 got rid of that entire folder for some reason.
That said, I updated from a perfectly working Version 1.3 to 1.4, and when I click to download the image, it takes me to "That page could not be found". And aside from the extra_datafiles being removed, I can't figure out anything that's wrong.
My advice, stick with 1.3 for now. It's less visually appealing, but it works beautifully. (assuming you've set your Configure.php as stated in the readme)
Re: Customer Uploaded Files - List and Download
Quote:
Originally Posted by
Lordzoabar
If you install the previous version (Version 1.3) first, then overwrite with 1.4, the the page shows up fine. From what I can tell, it HAS to have the extra_datafiles (admin->includes->extra_datafiles) included, and 1.4 got rid of that entire folder for some reason.
That said, I updated from a perfectly working Version 1.3 to 1.4, and when I click to download the image, it takes me to "That page could not be found". And aside from the extra_datafiles being removed, I can't figure out anything that's wrong.
My advice, stick with 1.3 for now. It's less visually appealing, but it works beautifully. (assuming you've set your Configure.php as stated in the readme)
Not sure why i deleted it from the package, must have been a brain fart, as it is obviously needed, as it also contains the values that were previously in the configure.php file.
The not working download link: I will investigate that, and report back
Re: Customer Uploaded Files - List and Download
quick fix for v1.4
add global $db; to uploads.php
so that
PHP Code:
function download_file($index, $oid) {
// Look up in the database of upload files, that
looks like
PHP Code:
function download_file($index, $oid) {
global $db;
// Look up in the database of upload files, that
Re: Customer Uploaded Files - List and Download
Version 1.4.1 has been submitted
Bug fixes
1. add missing file
2. add missing global in uploads file
3. add language parameter to query, so file do not show multiple times in multilingual stores.
Re: Customer Uploaded Files - List and Download
did that. added the content to configure.php. except the 2 lines in the readme file dont exist in confgure.php on 1.5.5f. now it almost works but when I click the image link I get this: File "/home/xxxxx/public_html/xxxx/DIR_WS_IMAGESuploads/2.png" does not exist (254)