| Project: | Mobile Media Blog |
| Version: | master |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | sanduhrs |
| Status: | closed (fixed) |
Issue Summary
I'm running drupal 5 with mailhandler and mmb all setup correctly. I can send emails from my blackberry which are automatically posted to the site. I can do the same from a pc as well.
The problem arises with attachments. When sending from a pc, using Thunderbird, an attached image correctly uploads and posts along with the text (as an attachment) into a new post in drupal. But from the blackberry, the attachment is named =?windows-1252?b?su1hmdawntyuanbn?= or something similar. The filesizes are always correct, it's just that the filename does not convert from windows 1252 encoding to utf8 or whatever drupal uses.
And therefore is cannot be accessed, even though the node shows a file named =?windows-1252?b?su1hmdawntyuanbn?= attached, with a size of 77.41 KB.
any help on this would be appreciated...
| Attachment | Size |
|---|---|
| screenshot_39.png | 26.23 KB |
Comments
#1
Try to change the encoding in your blackberry to utf-8.
vg
#2
Thanks,
Yes, I should have mentioned that I tried this. And it's not an option for the blackberry pearl.
I've also tried sending using MMS which attaches 4 layout/theme images correctly from the mss message, but not the actual cell phone image sent, just the theme related ones.
#3
Think I found the problem, please have a look at the attached patch.
#4
It works! many thanks... now I just have to get it to convert to an image node automatically..
Here's what I did. I don't really know how to apply patches easily yet, so what I did was take the 5.x-1.x-dev version (tried with HEAD but it didn't work there) of the module and replaced the following line: (line number 92 in my editor...)
$files[$key]['filename'] = strtolower($structure->dparameters[0]->value);
with this line:
$files[$key]['filename'] = strtolower(imap_utf8($structure->dparameters[0]->value));
Now it correctly displays an attachment that, when clicked, links to the image I sent from my crackberry..
#5
Commited to CVS, thanks.
Try the latest HEAD version [1] from CVS [2] of the module for image node support.
And change the default commands in mailhandler to type: image.
Or just provide a type: image followed by a new line in your e-mail when sending images, to override the default commands per mail.
The first attached image will be the image used by image module, all other files are attached to the node.
vg
[1] http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/mmb/mmb.mod...
[2] http://drupal.org/handbook/cvs
#6
This is fixed.
#7