Upload an Image with Special Chars

edited April 2012 in Modules
Hi,


I have created a module for "products" and all work fine, but if i upload an image that looks something like:

myimage_&^%$@_1.png it will not upload, where can I change this function to allow any characters within an image upload?

Thanks in advance.

Comments

  • edited 11:56PM
    Are you getting an error message or is the image simply not appearing to be uploaded? Also, is it possibly uploaded but with the special characters removed? FUEL uses the url_title function to clean file names up. This function is applied in the fuel/modules/fuel/controllers/module.php _process_uploads method
  • edited 11:56PM
    no error message and if the image is something like image_123-another.jpg it wont upload, something clearly to do with santize.
  • edited 11:56PM
    Try adding to your module config the parameter: sanitize_images => FALSE
    http://getfuelcms.com/user_guide/modules/simple
  • edited 11:56PM
    Actually it was set to false, so I set it to true and works just fine now! Thanks anyway.
  • edited 11:56PM
    Hmm... that's the opposite of what I would think. The sanitize_images parameter will run the xss_clean function on images which can sometimes generate a "false positive" and not properly upload the image. However, come to think of it, you would have gotten an error message stating that it wasn't uploading. Also, if the file is bigger then the Apache configured max_upload size, it will appear to have uploaded without any errors but will actually fail silently.
Sign In or Register to comment.