Page 1 of 2 12 LastLast
Results 1 to 10 of 84

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Posts
    286
    Plugin Contributions
    0

    Default Re: Customer Uploaded Files - List and Download

    This is a great mod, thanks.
    I'm trying to format the upload name in the order email. I can't seem to control it through the email .css. Any ideas?

    Is there any way to show the uploaded image in the admin or order email? I guess that would involve ctreating a thumbnail of the upload if it's an image.

    Cheers and thanks again,

  2. #2
    Join Date
    Oct 2005
    Posts
    286
    Plugin Contributions
    0

    Default Re: Customer Uploaded Files - List and Download

    I just tried the new uploads.php file but it gives an error - zc.orders not found.

  3. #3
    Join Date
    Feb 2005
    Location
    Syracuse, New York, USA
    Posts
    37
    Plugin Contributions
    1

    Default Re: Customer Uploaded Files - List and Download

    Quote Originally Posted by marknew View Post
    I just tried the new uploads.php file but it gives an error - zc.orders not found.
    Details, please! What is the exact text of the error message? What version of ZC are you running?

  4. #4
    Join Date
    Oct 2005
    Posts
    286
    Plugin Contributions
    0

    Default Re: Customer Uploaded Files - List and Download

    That problem was when i used the "updated" uploads.php from 3DPeruna. I have gone back to the original uploads.php.

    The problem i have now is uploaded jpegs named filename.jpg download correctly but files where the extension is in capitals - EG filename.JPG can't be downloaded. When i click the link it says the file can't be found.

    The error message is -
    File "/home/newmedia/public_html/photosoncanvas.net.au/images/uploads/54.jpg" does not exist (251)

    I have checked an the file is the but any files ending in .JPG aren't found.

    Zencart 1.3.9d

    Also, is there a way to remove the old files from the download list?

    Thanks
    Last edited by marknew; 1 Dec 2010 at 11:13 PM.

  5. #5
    Join Date
    Feb 2005
    Location
    Syracuse, New York, USA
    Posts
    37
    Plugin Contributions
    1

    Default Re: Customer Uploaded Files - List and Download

    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).

  6. #6
    Join Date
    May 2007
    Posts
    92
    Plugin Contributions
    0

    Default Re: Customer Uploaded Files - List and Download

    Thanks for the above changes to fix the issue with uppercase and lowercase file extension. Found out I had the issue when I installed this mod, found this forum and made the changes and they work perfectly.

    Of note too, is having a delete function on these uploads would be perfect so I'm on the list for seeing that come about too.

  7. #7
    Join Date
    Jun 2010
    Location
    United Kingdom
    Posts
    24
    Plugin Contributions
    0

    Default Re: Customer Uploaded Files - List and Download

    Hi All,

    I've just downloaded this contribution but I don't think all the files are there?

    I have the following directory Structure:

    _MACOSX
    |-uploads1.01
    | |-admin
    | | -includes
    | | |-boxes
    | | | |- ._.DS_Store
    | | |-languages (this directory is Empty)
    | |- ._.DS_Store
    | |- ._uploads.php
    |- ._.DS_Store
    |- ._readme.txt

    uploads 1.01
    |-.DS_Store
    |-licence.txt
    |-readme.txt


    Is there supposed to be more files as it doesn't seem to be working at all.

    Regards,

    Brett Rogers

  8. #8
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: Customer Uploaded Files - List and Download

    Quote Originally Posted by decartwr View Post
    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!

  9. #9
    Join Date
    Oct 2012
    Posts
    49
    Plugin Contributions
    0

    Default Re: Customer Uploaded Files - List and Download

    Quote Originally Posted by marknew View Post
    That problem was when i used the "updated" uploads.php from 3DPeruna. I have gone back to the original uploads.php.

    The problem i have now is uploaded jpegs named filename.jpg download correctly but files where the extension is in capitals - EG filename.JPG can't be downloaded. When i click the link it says the file can't be found.

    The error message is -
    File "/home/newmedia/public_html/photosoncanvas.net.au/images/uploads/54.jpg" does not exist (251)

    I have checked an the file is the but any files ending in .JPG aren't found.

    Zencart 1.3.9d

    Also, is there a way to remove the old files from the download list?

    Thanks
    I am also getting an error:
    File "/home3/spinaweb/public_html/guardsman/images/uploads/37.jpg" does not exist (254)
    I have double checked file locations and that the .jpegs are in the uploaded folder, - got to be something simple - PLEASE HELP - greeat plugin just not quite there :) Zen Version 1.5

  10. #10
    Join Date
    Oct 2012
    Posts
    49
    Plugin Contributions
    0

    Default Re: Customer Uploaded Files - List and Download - FIGURED MY PROBLEM

    Quote Originally Posted by webmeister View Post
    I am also getting an error:
    File "/home3/spinaweb/public_html/guardsman/images/uploads/37.jpg" does not exist (254)
    I have double checked file locations and that the .jpegs are in the uploaded folder, - got to be something simple - PLEASE HELP - greeat plugin just not quite there :) Zen Version 1.5
    I was using images from my Zen cart images folder - once I used images from outside the program it worked great!...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 9
    Last Post: 9 May 2013, 09:57 PM
  2. CUSTOMER UPLOADED FILES LIST AND DOWNLOAD issue
    By jcwynford in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 14 Dec 2010, 08:40 AM
  3. Where do uploaded customer files go?
    By kcb410 in forum Managing Customers and Orders
    Replies: 4
    Last Post: 22 Jul 2010, 03:13 AM
  4. Customer uploaded files
    By stars62 in forum General Questions
    Replies: 2
    Last Post: 12 Mar 2010, 06:22 PM
  5. How do I set up downloads? Download manager isn't showing my uploaded files
    By durkmusic in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 17 Jul 2009, 12:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg