Download & Extend

With mailsave to imagefield module activated, impossible to upload files, imported as images

Project:Mailsave
Version:5.x-3.1
Component:Code
Category:bug report
Priority:normal
Assigned:Stuart Greenfield
Status:active

Issue Summary

When combined with mailsave_to_imagefield, all attached files are passed to imagefield, disregarding their type (pdf, xls...).
After disabling the module, mailsave correctly saves attached files as such.

Comments

#1

Assigned to:Anonymous» Stuart Greenfield
Status:active» fixed

Ah - this is in part a problem with image field and part mailsave to image field. The official release of image field doesn't yet include the ability to set allowable image extensions, but the 5--2 branch does. However, a bug in mailsave to image field meant that in this case it was incorrectly treating all file types as images!

I've uploaded a fix to HEAD, which means that if allowable extensions are defined then they will be used, and in all cases the mime type will be checked to see that it is an image type by using the mime data. This should work properly with the current official image field.

My only concern is that some mail clients (e.g. my hosts webmail client) report images as octet streams, so these would be rejected. I'll come back to that later as I'm pretty busy on other (non-Drupal!) things at the moment.

Let me know if the HEAD version works for you (it does for me on test system). If OK I'll release it officially.

Thanks.

#2

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#3

Component:Miscellaneous» Code
Priority:critical» normal
Status:closed (fixed)» active

I'm having the same issue with Drupal 5.7, mailsave-5.x-3.3, and mailhandler-5.x-1.4. As shown below, if I attach a pdf I get new content with no visible attachment, but when I edit the content, the attachment is there under image attachments. If I manually navigate to the url of the image that is the left-most "ECE271HW7.pdf" I get my attachment. Very odd.

Note, if I disable the CCK Image option in the mailsave module, then Retrieve in mailhandler just sends me to a blank page and performs no action (also failing to log any action).

AttachmentSize
mailsave_pdf_result_brownatduke.png 11.93 KB
mailsave_pdf_view_brownatduke.png 18.23 KB
nobody click here