Add images/video via Mailhandler?

brashquido - April 10, 2006 - 01:41
Project:Mailhandler
Version:4.6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi All,

I need to be able to submit content to my Drupal 4.7 sites via e-mail, as I will having very sporadic access to the Internet later this year and the most part of next year. Mailhandler looks ideal for this for text, but I will also be wanting to upload images and video as I go. I saw that there was some talk of doing this for images a while back, but it doesn't seem to have ever made it into Mailhandler;

http://drupal.org/node/5674

Being able to upload images via e-mail is most important for me, but I can also see myself needing to upload video and probably other file types as well. Wondering if it were possible to implement a common interface to allow the upload of any filetype to any content type and category via e-mail? I am not a coder myself, but would be happy to help out with doco and/or financially to see this feature implemented.

#1

Stuart Greenfield - April 15, 2006 - 07:37
Version:HEAD» 4.6.x-1.x-dev

Someone suggested I cross post to here (original post).

I have customised mailhandler and got it talking to image, so if a jpeg comes in with the email it will be stored and the post converted to an image node, complete with thumbnails. If you later delete the post then the images are removed from the /files directory etc.

There seem to be open requests on 4.3.0 and on cvs. My version is for 4.6.0 as that is what I'm using and I'm still learning Drupal, but maybe someone can adapt from this source?

Example of a post sent by mobile using this code. There's also a zip file at the above link with my modified code in it.

The code will currently only parse the first jpeg attached.

#2

moshe weitzman - April 15, 2006 - 12:26

hopefully someone will take parts of this code and make a *separate module* which uses hook_mailhandler to process these images. Also has ot be 4.7 to be useful at this point.

#3

sanduhrs - April 17, 2006 - 15:24

Hey Stuart, great idea.
I love this functionality and need it for a new project.
So I ported it to Drupal4.7RC3 as an independet project, as suggested by moshe.
There's a alpha at http://drupal.org/node/59122 , it works with the mailhandler patch http://drupal.org/node/45590 .
Please join the development and post your feedback.
vg

#4

brashquido - April 18, 2006 - 04:37

Cool, I'll give your code a test Stefan, and post my comments there.

#5

Stuart Greenfield - April 19, 2006 - 12:51

How do I join in!!?

I can offer some support at the moment, but only four weeks until arrival of our first baby so might be intermittent, but I'd love to join in more.

I only started using Drupal about six months ago, but I'm hooked (no pun intended!) I'd like to get a bit more involved as I've really enjoyed the bits of coding I've done with it so far (the mailhandler mod and my new flash node!)

Btw - I'm still on 4.6 - I daren't upgrade my site to 4.7 in case junior arrives and I don't have time to fix it all!

#6

moshe weitzman - April 19, 2006 - 18:08

Mailhandler is now 4.7 compliant in CVS. I'm eager to hear reports about this module's features.

#7

moshe weitzman - April 19, 2006 - 18:08
Status:active» fixed

#8

Stuart Greenfield - April 22, 2006 - 16:35

I saw the comment about making the functions a separate module, rather than modifying mailhandler itself.

I have written a small module I've called mailsave that works with the basic mailhandler module to detach files. It goes futher than my original hack too as it can retrieve ALL the attachments from an email.

It detects if image is installed, and you can then choose to have image nodes created automatically using the first jpeg.

My code is still 4.6 as I haven't got time upgrade right now, but maybe someone can borrow from the code to develop a new module (e.g. mobile media blog).

I've posted a download here in case any wants to try / borrow.

#9

Anonymous - May 6, 2006 - 16:45
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.