Hi! If you have the "attachments" active for the image content type and the upload previews is active, when you access to an image upload previews set some warnings (one for the original image, one for the preview and one for the thumbnail).
I've fixed the module modifying the function:
upload_preview_upload_preview($file)
Substituting the line:
if (strpos($file->filemime, 'image/') === 0 ) {
with:
if (strpos($file->filemime, 'image/') === 0 && ( substr($file->filepath, 0 , 7) != variable_get('image_default_path', 'images') . "/" ) ) {
In my Drupal installation the images are stored on the "images" subdirectory.
In this way the image attachment still have the previews, but the images doesn't throws errors.
Comments
Comment #1
finex commentedPatch update.
Changes:
1) I've fixed the image file path check
2) Now the previews work with the images handled by the image node.
Apply the patch to the file:
upload_preview.module,v 1.10 2007/06/17 14:04:29
Comment #2
finex commentedPatch cleanup.
Comment #3
finex commentedActually the patch doesn't filter the node testing if the node type is "image", should it do that?
Comment #4
rmiddle commentedIt should check if node type is image. I should only check if the attachment is an image. There is a slight diff. Need to review for inclusion in the module.
Thanks
Robert
Comment #5
plan9 commentedThis patch no longer works with the current version of upload preview. Any chance of an update?
Please!!!
Comment #6
rmiddle commentedNeed to incorporate in a check for the image module. Just need to add checks to make sure the image module is installed before making the changes.
Thanks
Robert
Comment #7
pomliane commentedThis version of Upload previews is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.
This issue has been automagically closed by a script.