Results 1 to 10 of 18

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Upload file extension being stripped from .jpeg files

    Site is running 1.5.7b and some products have text/file attributes for customers to upload images. On the product page, the files is selected from the desktop and when the product is added to the cart it displays the full file name and extension. On checkout success, the order is written to the orders.products_attributes table, the products_options_values field is written as file-id. (313. instead of 313.jpeg for example) when the uploaded file extension is .jpeg. The file is uploaded in the images/upload folder with the correct name. If the file extension is .jpg it works as expected. I'm struggling to find the cause of this. Can anybody point me in the right direction?

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    8,650
    Plugin Contributions
    117

    Default Re: Upload file extension being stripped from .jpeg files

    Compare your copy of includes/classes/upload.php to a fresh download from 1.5.7b (your version).
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: Upload file extension being stripped from .jpeg files

    Quote Originally Posted by swguy View Post
    Compare your copy of includes/classes/upload.php to a fresh download from 1.5.7b (your version).
    They compared fine

  4. #4
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: Upload file extension being stripped from .jpeg files

    I should also add that this code appears to relate to the actual upload and not writing the uploaded file name to the database. No errors are received that it is an invalid file type and the file is written with the correct extension.

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    8,650
    Plugin Contributions
    117

    Default Re: Upload file extension being stripped from .jpeg files

    OK, how about includes/classes/order.php - any changes?
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #6
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: Upload file extension being stripped from .jpeg files

    The only change is to the section building the confirmation email at around line 1018
    PHP Code:
          $this->products_ordered_html .=
          
    '<tr>' "\n" .
          
    //RB mod - Product Image            
          
    '<td class="product-details" align="left" valign="top" width="30">' zen_get_products_image($this->products[$i]['id']) . '</td>' "\n" .
          
    //RB mod - Product Image 

 

 

Similar Threads

  1. v156 GET query string being stripped from url
    By badarac in forum General Questions
    Replies: 33
    Last Post: 20 Jan 2020, 10:34 PM
  2. v154 File Upload - Want users to be able to select Multiple Files
    By aws702 in forum General Questions
    Replies: 1
    Last Post: 28 Feb 2017, 07:57 PM
  3. File upload capability (1GB files)
    By hllight in forum General Questions
    Replies: 14
    Last Post: 1 Jun 2009, 03:11 PM
  4. My customers cannot upload files having uppercase letters in filename extension
    By Bostitch in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 17 Jun 2008, 03:05 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR