File uploaded was named isaac.jpg_w=402
It's a valid jpg file other than the odd filename.

Members fund testing for the Drupal project. Drupal Association Learn more


mikeytown2’s picture

Status: Active » Needs review
4.35 KB
mikeytown2’s picture

better version after testing it on our production servers

quicksketch’s picture

Status: Needs review » Needs work

I don't think FileField would let you upload a file like this would it? Are you just allowing all extensions?

This patch isn't really the greatest, with nested function definitions and case-specific code. Some of the code included in your patch have been incorporated into other fixed issues at this point.

mikeytown2’s picture

The reason this is needed for us has to do with editing a story that has been imported from a feed (something outside of our control). image_type_to_extension() is a PHP 5 only function. replacing ereg_replace would be a good idea. Another patch that uses this newly created function #1766064: User error: ImageMagick reported error code 1. Message: convert: no encode delegate for this image format