This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[BUG] Thunderbird picks incorrect mime type for inline png

Tags: None
(comma "," separated)
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
(This has been asked here and here, too.)

When I attach png images by dragging to the header region, they are attached as
Code: Select all
    Content-Type: image/png;
     name="foo.png"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
     filename="foo.png"


When I attach them inline by dragging into the body, they are attached as
Code: Select all
    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: base64
    Content-ID: <part1.00030206.09040704@my.sending.domain.com>


The latter displays fine for the recipient if they are using Thunderbird, or via the gmail web interface. However, I've had complaints from OSX Mail.app users that they can only see a text file <Mail Attachment.txt> full of nonsense. They have to save the file and rename it to *.png. Kmail also fails to display the image correctly.

It seems that Thunderbird is using the wrong mime type when png images are attached inline. (I also see something similar for .jpg files.) Apparently this works fine in Thunderbird Windows (i.e. Content-Type: image/png). Is it possible to make Thunderbird send inline attachments as the proper mime type?

TB 24.1.0
Kubuntu 13.10
KDE 4.11.2

Last edited by sparhawk on Wed Mar 19, 2014 2:34 am, edited 1 time in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Interesting - I assume you are dragging from Dolphin or similar applications when you do this?
I'm not sure why Thunderbird would do this - have you tried it's integrated functions to attach images inline to see if that has the same impact?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
Wow, good thinking! I tried inserting image from within Thunderbird itself, and this time it worked fine.
Code: Select all
Content-Type: image/png;
 name="foo.png"
Content-Transfer-Encoding: base64
Content-ID: <part1.random_numbers@foobar.com>
Content-Disposition: inline;
 filename="foo.png"


Previously I was dragging from Dolphin.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay. Do you have another file manager (such as Krusader) which you can try to perform a drag and drop from? You could also try to perform a drag and drop from the regular KDE open file picker. You might want to try dragging from the file picker of a non-KDE application like Inkscape / GIMP / Firefox as well.

If you are able to - does either of the above have any impact?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
bcooksley wrote:Okay. Do you have another file manager (such as Krusader) which you can try to perform a drag and drop from? You could also try to perform a drag and drop from the regular KDE open file picker. You might want to try dragging from the file picker of a non-KDE application like Inkscape / GIMP / Firefox as well.


I tried Konqueror, Krusader, Firefox (via the browser window itself), and Kate's file picker. They all produced the same problem.
Code: Select all
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: base64
Content-ID: <part1.random_numbers@domain.com>


With Firefox, I entered the file path into the url bar, and dragged from the main window. It's odd that this didn't work either, as I presume there's some kind of consistency between the Mozilla applications.

I tried dragging from Firefox and Inkscape's file picker, but I couldn't get either to work properly. I can drag into the "header" section of the compose window, but it won't let me drag inline, into the body (which is when I see this bug).

I also installed Nautilus, but I can't even drag from it! (Perhaps it's a dependency issue.)

==EDIT==
If anyone else tries to install Nautilus in KDE, note that it can (temporarily) break some things in Dolphin. Unlike Dolphin, Nautilus appears to start up automatically in the background (perhaps because of Gnome's concept of a desktop). While Nautilus was running, I couldn't trash anything in Dolphin, and the automatic trash emptying wasn't working. Killing Nautilus fixed this for me.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay, as Firefox itself uses a Gtk based file picker i'm going to assume this is a bug in Thunderbird not handling dropped data properly - you might want to try the latest version of Thunderbird, or file a bug against it in their bug tracker.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
bcooksley wrote:Okay, as Firefox itself uses a Gtk based file picker i'm going to assume this is a bug in Thunderbird not handling dropped data properly - you might want to try the latest version of Thunderbird, or file a bug against it in their bug tracker.

I'm not sure if I were unclear or if I misunderstand you, but in Firefox, I didn't use the file picker per se. I typed my local file path into the url location bar of Firefox, so as to use the main window of Firefox as a file browser. I then dragged the hyperlink from Firefox into the compose window of Thunderbird.

Also, out of interest, do you use Thunderbird, and, if so, do you see the same thing? I'm wondering if it might be distro-specific…
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I'm afraid I don't use Thunderbird. In regards to Firefox, simply being able to reproduce the issue with it indicates that this is likely not a KDE implementation bug (as a hyperlink and an actual file reference are likely implemented in the same way in the underlying drag and drop protocol).


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
bcooksley wrote:I'm afraid I don't use Thunderbird. In regards to Firefox, simply being able to reproduce the issue with it indicates that this is likely not a KDE implementation bug (as a hyperlink and an actual file reference are likely implemented in the same way in the underlying drag and drop protocol).

Yeah, okay. I think you are probably right, as I also tried doing the same in my Xubuntu install with Firefox. I guess I'll file a bug with Mozilla then, although they never seem to even read my bug reports.

Thanks for the help again.

==EDIT==
I downloaded the version from the Mozilla website, and it doesn't have this bug, so it's introduced in the Ubuntu packages.
I've filed a bug with Ubuntu.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]