After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 714002 - Save inline image sent via a data: URI
Save inline image sent via a data: URI
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: attachments
master
Other All
: Normal normal
: ---
Assigned To: Geary Maintainers
Geary Maintainers
Depends on: geary-wk2 765516
Blocks:
 
 
Reported: 2013-09-11 10:11 UTC by Jim Nelson
Modified: 2017-12-11 20:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Charles Lindsay 2013-11-21 20:23:55 UTC


---- Reported by jim@yorba.org 2013-09-11 15:11:00 -0700 ----

Original Redmine bug id: 7474
Original URL: http://redmine.yorba.org/issues/7474
Searchable id: yorba-bug-7474
Original author: Jim Nelson
Original description:

An HTML email can deliver an inline image using a `data:` URI. Geary should be
able to save this image to disk at the user's request.

Related issues:
related to geary - Feature #5836: Need an option for saving embedded / inline
images displa... (Fixed)



--- Bug imported by chaz@yorba.org 2013-11-21 20:24 UTC  ---

This bug was previously known as _bug_ 7474 at http://redmine.yorba.org/show_bug.cgi?id=7474

Unknown milestone "unknown in product geary. 
   Setting to default milestone for this product, "---".
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.
Resolution set on an open status.
   Dropping resolution 

Comment 1 Federico Bruni 2015-04-21 20:51:27 UTC
I think that I just came across something similar, but I need your confirmation.

A person forwarded to me an email received from another person, who included an inline image in his message. I cannot save this image.

This is the relevant part of the source message, just before the image binary data:

--Apple-Mail-CA2FED49-4936-4E4C-8A23-C2757ADDADBC
Content-Type: image/jpeg;
	name=20150417_160119_Fotor.jpg;
	x-apple-part-url=7EFEDC69-4628-4512-99F0-DE76D863C1FA
Content-Disposition: inline;
	filename=20150417_160119_Fotor.jpg
Content-Transfer-Encoding: base64
Content-Id: <7EFEDC69-4628-4512-99F0-DE76D863C1FA>
Comment 2 Federico Bruni 2015-06-01 11:25:48 UTC
Today a friend sent from an iPad some images displayed in the body. I can save theme, one at the time. This is the part of the source message, not much different from the previous.

--Apple-Mail-4C18336D-0C83-44C4-B8D0-0C2D0478200A
Content-Type: image/jpeg;
	name=IMG_4546.JPG;
	x-apple-part-url=947C1982-DD14-4748-9067-D1F218303BC3
Content-Disposition: inline;
	filename=IMG_4546.JPG
Content-Transfer-Encoding: base64

The only difference I see is that I could save the images sent directly and I could not save the images from a forwarded email.
Comment 3 Federico Bruni 2016-09-17 17:43:30 UTC
Here's another example of an inline image that I cannot save to disk.
There's no data: URI though. Should I open a new bug for this?

X-Mailer: Apple Mail (2.1878.6)


--Apple-Mail=_76D270A9-C02A-41E9-B2A9-FB1CAC481BE9
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=us-ascii



--Apple-Mail=_76D270A9-C02A-41E9-B2A9-FB1CAC481BE9
Content-Type: multipart/related;
	type="text/html";
	boundary="Apple-Mail=_95A8AA7B-28BE-457B-8C9B-01CE8F50EC18"


--Apple-Mail=_95A8AA7B-28BE-457B-8C9B-01CE8F50EC18
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><img apple-inline="yes" id="C3368CCC-37E5-4C93-9933-272031B8E7ED" height="1641" width="1160" apple-width="yes" apple-height="yes" src="cid:9DDC5C61-D9AF-45F5-9C8C-BD0B8F4D31A5@homestation.setup"><br></body></html>
--Apple-Mail=_95A8AA7B-28BE-457B-8C9B-01CE8F50EC18
Content-Transfer-Encoding: base64
Content-Disposition: inline;
	filename=Calta2016.jpg
Content-Type: image/jpg;
	name="Calta2016.jpg"
Content-Id: <9DDC5C61-D9AF-45F5-9C8C-BD0B8F4D31A5@homestation.setup>
Comment 4 Michael Gratton 2016-09-19 12:52:04 UTC
I think the non-data-uri cases may have been solved in Bug 765516, but image loading (and hence image saving) is going to be changed a fair bit with that and Bug 728002, so I'll try to get to this after those bugs have landed.
Comment 5 Michael Gratton 2017-02-01 00:41:54 UTC
Federico: This bug covers images using a data URI, e.g. <IMG SRC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
9TXL0Y4OHwAAAABJRU5ErkJggg=="/>

With the WK2 port landing, you should be able to save normal inline images (i.e. the ones Apple Mail sends) using the context menu. Please open a new bug if that's not the case.
Comment 6 Federico Bruni 2017-02-01 17:26:35 UTC
Mike, I confirm that I can save those images. Thanks!

Just a minor thing: the default name file when I save it is the weird content of Content-Id below, while the original file name is in the filename field within the Content-Disposition block:

--Apple-Mail=_D833EEE3-2EC1-4F3F-8F9F-91F6ADAED594
Content-Transfer-Encoding: base64
Content-Disposition: inline;
	filename=Gambetta10th.jpg
Content-Type: image/jpg;
	x-mac-type=3F3F3F3F;
	x-mac-creator=3F3F3F3F;
	x-unix-mode=0644;
	name="Gambetta10th.jpg"
Content-Id: <679BC2AB-BF7A-4CBE-AE37-574B5713288A@homenet.telecomitalia.it>

Let me know if I should open a new bug for this.
Comment 7 Michael Gratton 2017-02-01 23:55:06 UTC
Cool, good to hear. Bug 778026 already covers the filename, ta.
Comment 8 Federico Bruni 2017-12-11 17:53:01 UTC
Mike, I've just made a test on the same file and when I click on "save image as" I get the expected file name. I confirm Bug #778026 has covered it.

There's anything left to do here? Can we close it?
Comment 9 Michael Gratton 2017-12-11 20:50:19 UTC
Looks good to me!