I use the Filefield Paths module to keep my files directory organized, so attachments for different content types go in their own subfolders. However, attachments to nodes that come in via Mailsave all get dumped in the root files folder, creating a mess. Can we get these modules to play nicely together? It seems like it might be something as simple as firing a hook after saving the attachment letting other modules (a la FileField Paths) know that the node has been edited and an attachment added, so that they can do their thing (move the file into the appropriate directory).
Comments
Comment #1
yixiu commentedSubscribing
Comment #2
WeRockYourWeb.com commentedProbably not the solution you're looking for, but here's a hack that got the job done for me (mailsave_to_imagefield.module) line 107 start following:
Portions of this were borrowed from a previous hack. Again, I know hacks are not the way to go, but I'm not good enough yet to rewrite all the code.
You'll notice that I borrow the node title, which comes from the email subject, to create the filename. You can omit this part if you don't want this functionality.
Comment #3
yngens commentedSubscribing. Would be nice to have official version instead of hack.
Comment #4
danepowell commentedHave you tried the 2.x version of Mailhandler to see if it works with Filefield Paths? It handles files 'natively', no dependency on Mailsave...