Posted by quicksketch on July 12, 2009 at 6:37am
3 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | file system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | quicksketch |
| Status: | closed (duplicate) |
| Issue tags: | D7FileAPIWishlist, ImageInCore, Quick fix |
Issue Summary
In the file_validate_is_image() function we're reporting an inaccurate message. Currently we say that only PNG, JPG, and GIF images are supported, when in fact any image supported by PHP's getimagesize will pass (such as PSD, TIFF, PICT, etc.)
This functionality may get even more blurred with #269337: Support for more image types (PDF, TIFF, EPS, etc.), in which additional types such as PDF or EPS might become supported. So the easy solution is simply to fix this message. This is a forward-port from FileField in Drupal 6.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| file_validate_is_image_message.patch | 564 bytes | Idle | Failed: 11601 passes, 1 fail, 0 exceptions | View details | Re-test |
Comments
#1
The last submitted patch failed testing.
#2
Well I thought I fixed that test, but must not have made it into the patch.
#3
I haven't tested that function on other formats but if you take a look at image_get_info() you'll see that only those three types set an extension.
#4
Oh a good point, maybe this should wrapped into #269337: Support for more image types (PDF, TIFF, EPS, etc.) then?
#5
quicksketch yeah that seems like the best place for it.