MozillaZine

Open Attachments With problem (Solved, at least sort of)

User Help for Mozilla Thunderbird
John Liebson
 
Posts: 6461
Joined: July 29th, 2003, 1:09 pm

Post Posted August 18th, 2017, 2:50 pm

TB version 52.3.0, with Windows 10 Home (up-to-date).

Right click on an attachment, then Open, Open with, Browse, and choose an image viewer. Pick a viewer, click on OK, then try to click on the box for "Do this automatically..."; nothing happens for me.

Shortly after posting, I realized that I had not tried TB in Safe Mode; have now so done, no change to "Do this automatically...".
Last edited by John Liebson on August 20th, 2017, 10:02 am, edited 1 time in total.

tanstaafl
Moderator

User avatar
 
Posts: 43253
Joined: July 30th, 2003, 5:06 pm

Post Posted August 18th, 2017, 3:02 pm

Moved from Thunderbird Bugs to Thunderbird Support.

You might need to delete the mimetypes.rdf file in your profile. It occasionally gets corrupted. It controls how attachments are opened/viewed. When you restart it will be replaced by a file with default values.

John Liebson
 
Posts: 6461
Joined: July 29th, 2003, 1:09 pm

Post Posted August 19th, 2017, 4:27 am

tanstaafl wrote:Moved from Thunderbird Bugs to Thunderbird Support.

You might need to delete the mimetypes.rdf file in your profile. It occasionally gets corrupted. It controls how attachments are opened/viewed. When you restart it will be replaced by a file with default values.


Closed TB, deleted file, restarted TB, still did not work. Checked folder, no new file had been created. Tried two more times, same result, there is now no mimetypes.rdf file in TB.

tanstaafl
Moderator

User avatar
 
Posts: 43253
Joined: July 30th, 2003, 5:06 pm

Post Posted August 19th, 2017, 5:05 am

http://kb.mozillazine.org/Actions_for_a ... file_types

Any chance you have more than one profile and deleted the file in the wrong profile?

John Liebson
 
Posts: 6461
Joined: July 29th, 2003, 1:09 pm

Post Posted August 19th, 2017, 5:31 am

tanstaafl wrote:http://kb.mozillazine.org/Actions_for_attachment_file_types

Any chance you have more than one profile and deleted the file in the wrong profile?


No: I removed the file from the folder that is found through Troubleshooting Information, and it is the folder for the TB profile in use as shown by the Profile Manager. Curiously, I have a profile titled Default that also does not have a Mimetypes.rdf file, but the third profile does have a file. I believe that those latter two profiles are leftovers from some problem or another, such as a failure Windows 10 install or other cause.

DanRaisch
Moderator

User avatar
 
Posts: 117689
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted August 19th, 2017, 9:29 am

Have you tried copying the mimetypes.rdf file from the one profile that has it to the current profile?

John Liebson
 
Posts: 6461
Joined: July 29th, 2003, 1:09 pm

Post Posted August 19th, 2017, 10:53 am

DanRaisch wrote:Have you tried copying the mimetypes.rdf file from the one profile that has it to the current profile?


Yes, I did, and not only does that not work, but the entry for "Open with" is not there, which it is when I don't have (or rename) the mimetypes.rdf file.

To further confuse matters, which I am certain needs to be done, when I try to start TB with the .rdf-containing profile, all I get is an error message about the profile being unusable or something of that nature.

I just created a new TB profile--and it does not have a mimetypes.rdf file.

Back to the TB profile I use: Tools/Options/Attachments clearly shows that .jpeg and .png files should be opened with IrfanView, but when I click on such files, instead of opening them, I am asked how I want to open them. That the default viewer is already set may well account for the "Do this automatically" box not being able to be filled, but not for the failure of TB to not recognize its existing default settings for these files. (Move this back to TB Bugs?)

tanstaafl
Moderator

User avatar
 
Posts: 43253
Joined: July 30th, 2003, 5:06 pm

Post Posted August 20th, 2017, 5:21 am

I deleted my mimetypes.dat file, exited and restarted Thunderbird. It was not replaced. However, after opening an attachment (where I checked the checkbox to remember to use irfanview), it created a mimetypes.rdf file. So it looks like they now delay creating a replacement file until a default value will be changed.

John Liebson
 
Posts: 6461
Joined: July 29th, 2003, 1:09 pm

Post Posted August 20th, 2017, 10:01 am

tanstaafl wrote:I deleted my mimetypes.dat file, exited and restarted Thunderbird. It was not replaced. However, after opening an attachment (where I checked the checkbox to remember to use irfanview), it created a mimetypes.rdf file. So it looks like they now delay creating a replacement file until a default value will be changed.


Late yesterday afternoon, as I was preparing dinner (MaPo DouFu, a traditional New Mexican dish..), I realized that when I had checked the Tb Options for attachments, and found entries there, I no longer knew what, if any mimetypes file I had. Having read the message to which I am replying, I just did some checking and testing.

1. I did fine a .rdf, which had been updated yesterday.
2. I renamed it, restarted TB, tried once again to check on the `always use' box, which did not work; I opened an image in IrfanView, then restarted TB; no new .rdf had been created.
3. I tried, again, opening an image, this time with yesterday's new profile; `always use' would not accept an entry, nor was a new .rdf accepted. In the Options/Attachments module, there was box, with no entries; the dropdown for identifying the type of attachments had nothing in it. There is a search box, but I don't know what to search for.
4/ Returning to my default profile, having renamed old.mimetypes.rdf to mimetypes.rdf, i changed the Options/Attachments listing for .jpeg from IrfanView to `always ask,' and opened an image. After restarting TB, I found that the .rdf file had just been modified.

That's about what I have found over the past several minutes, none of which makes either any sense to me nor fixes the problem. That neither my default profile nor my brand-new one will create a new .rdf indicates to me why the `always use' box is inaccessible. To continue testing, I am going to upload a .jpeg with an actual file name to TB, as the ones I have been using for testing just show, on the task bar as image/jpeg/etc., which seems a bit odd.

Problem never existed! I attached a named .jpeg to my message; before sending it, I tried to view it, and as if I needed more confusion, when I clicked on it in my message, it opened in irfanView. i sent and received the file; when I went to open the attachment, TB asked if I wanted to continue using IrfanView, so I replied in the affirmative. Viewed image, closed it, and when i again clicked on it in TB, it opened without asking how I wanted to view it.

Finally, I closed TB, renamed the rdf, restarted, clicked on my named .jpeg; IrfanView was already in the box, likely as it is my Windows default, AND I was able to select the `always use' box. Viewed imaged, closed and restarted TB, AND a new rdf had been created.

I admit I was not paying much attention to the names of the four images in the email where I found what seemed to be a TB problem; how they got sent the way that they did, with what I now realize were not even common file names, is unknown to me.

makaiguy

User avatar
 
Posts: 16477
Joined: November 18th, 2002, 6:44 pm
Location: Somewhere in SE USA

Post Posted August 20th, 2017, 11:02 am

The names of the image files is not the issue. What controls this whole thing is what "Content-Type" is defined for the attached (or embedded) file by the program that originated the email. The Content-Type (often referred to as the "MIME Type"), not the filename, is what RFC specs define as the mechanism for telling the receiving client how to handle the file.

While viewing the received email message in TBird, click View | Message source (or just press Ctrl+U) and look through the code to find the block of image code for that file. The header at the beginning of that block should define what type of file is included in the Content-Type header, using the correct MIME type for that type of file . Here's an example for a .jpg file from a message I recently received:
Code: Select all
--------------AFF2B5F6FE30F1191F4013DB
Content-Type: image/jpeg;
 name="image001.jpg"
Content-Transfer-Encoding: base64
Content-ID: <part1.727F21C7.1FB6A555@iname.com>
Content-Disposition: inline;
 filename="image001.jpg"

Note that the correct MIME type for a jpg file is "image/jpeg".

If the client creating the message doesn't tag the file with its correct recognized MIME type, standards-compliant clients like TBird won't know how to handle the file. If the file has not been labelled with the correct MIME type, telling TBird to open it with some particular program and then to remember this for future downloads doesn't give TBird the info it needs to open properly-tagged files of the same type. (And I'm not sure if it will save the info at all if the given Content-Type isn't a recognized one.)
Doug Wilson, "The Makai Guy"
Win10 (64bit): FF 52.4.0 ESR (64bit), TB 52.3.0 (32bit)║ Android 7.0/7.1.1: FF 57..0, No TB for Android available, dammit!
What a fool believes he sees, no wise man has the power to reason away - Doobie Brothers

John Liebson
 
Posts: 6461
Joined: July 29th, 2003, 1:09 pm

Post Posted August 20th, 2017, 11:16 am

They are shown as Content-Type: application/octet-stream; name="image/jpeg"

tanstaafl
Moderator

User avatar
 
Posts: 43253
Joined: July 30th, 2003, 5:06 pm

Post Posted August 20th, 2017, 12:19 pm

You will have problems opening an attachment with the content type as "application/octet-stream" because that basically means its generic 8bit binary data not associated with any application. The file should have had a Content-Type header set to image/jpeg . That would tell Thunderbird its a jpeg image file. Thunderbird is not going to deduce that from the filename extension, it uses the content type.

My impression is that is supposed to happen if the the MIME type is not recognized. This could occur as a side effect of the sender downloading the file using a browser that didn't properly recognize the MIME type. If that happened and they sent it as an attachment I don't believe the senders email client would automatically detect and fix the problem.

It would have been a very handy feature if Thunderbird used the file name extension to guess the application type whenever the content type was set to "application/octet-stream" but they don't do that.

John Liebson
 
Posts: 6461
Joined: July 29th, 2003, 1:09 pm

Post Posted August 20th, 2017, 1:20 pm

I wondered what "application/octet-stream" means, having never heard of a river by that name, nor having ever encountered this problem with a single attachment to any emails received with TB, nor any images with the names of the ones I was using for testing. That is not meant as an excuse on my part, simply a statement of why it took me so long, so many tests, to find that what I originally thought was a bug, and which caused me so much frustration, and turned out not to be a bug but, rather, a fault of the company that sent the email to me..

Return to Thunderbird Support


Who is online

Users browsing this forum: No registered users and 5 guests