Open Bug 283511 Opened 20 years ago Updated 8 months ago

Bad choice of default name when saving unnamed, embedded image from HTML message

Categories

(MailNews Core :: Backend, defect)

defect

Tracking

(Not tracked)

People

(Reporter: age.bosma, Unassigned)

Details

(Keywords: dupeme)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

The extension of the file format isn't automatically added to the file name when
saving an inline image from an e-mail.
Also the default name of the image shouldn't be "Inbox". It should take the
original file name (if available and I assume it is, isn't it?). If the file
name isn't available it should use a name like "image.jpg". Maybe even
"image01.jpg" and "image02.jpg" if that file name already exists in the active
directory, etc.

Reproducible: Always

Steps to Reproduce:
1. Right click an image in an e-mail
2. Click "Save As..."
3. Default file name is "Inbox"
4. "Save as type" dropdown only allows you to select "All Files"
5. Click "Save"
Actual Results:  
If you didn't add the extension manually and didn't change the file name this
will result in an extensionless "Inbox" file.

Expected Results:  
If the name isn't changed I should get "Inbox.jpg" (If the file is a JPEG that
is...)
Come to think of it, something else might be wrong here...
When trying to forward the e-mail, the image didn't get included in the forward
compose window either. I assume this should have been the case, shouldn't it?
(In reply to comment #0)
> The extension of the file format isn't automatically added to the file name
> when saving an inline image from an e-mail.

That's bug 90490.


> It should take the
> original file name (if available and I assume it is, isn't it?). 

It's available if it's been included in headers for the image within the message 
-- that's up to the client that created the message.  You can check this by 
examining the message source and looking for a block of text that appears as, 
for instance:
--------------000109050907040305040506
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-ID: <part1.09090902.03040708@well.com>
Content-Disposition: inline

iVBORw0KGgoAAAANSUhEUgAAAOEAAADICAIAAACRchHTAAAc6UlEQVR4nO1dTWgc15b+avBC
D/ygDFnEEC0MaXAMAnvZgl5MstOgLGS8iJu3GIdZyOHNwu73FkmYxTDJIrS0mGBplcwilLMw
[...]

Filenames can be specified in the Content-Type or Content-Disposition headers 
(or both -- and if both are present, they may even conflict).


> Also the default name of the image shouldn't be "Inbox".  [...]
> If the file name isn't available it should use a name like "image.jpg".
> Maybe even "image01.jpg" and "image02.jpg" if that file name already exists
> in the active directory, etc.

If no name is supplied, then you're correct -- saving the embedded image picks 
the name of the msg's folder as the default name of the image.  There may be an 
existing bug about this problem, but at the moment I can't find it.

Reproduced this symptom with TB 1.0+0222 and in Moz 1.8b-0120 -- moving to Core.

See bug 182142 for a similar request for a default-filename preference.
Assignee: mscott → sspitzer
Severity: normal → minor
Status: UNCONFIRMED → NEW
Component: Mail Window Front End → MailNews: Backend
Ever confirmed: true
OS: Windows XP → All
Product: Thunderbird → Core
Hardware: PC → All
Summary: Save as... function to save an inline e-mail image will result in a file without an extension → Bad choice of default name when saving unnamed, embedded image from HTML msg
Version: 1.0 → Trunk
sorry for the spam.  making bugzilla reflect reality as I'm not working on these bugs.  filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
QA Contact: backend
Product: Core → MailNews Core
Severity: minor → S4
Keywords: dupeme
Summary: Bad choice of default name when saving unnamed, embedded image from HTML msg → Bad choice of default name when saving unnamed, embedded image from HTML message
You need to log in before you can comment on or make changes to this bug.