Take the 2-minute tour ×

When encoding a picture, say, into a MIME base64 string, is there a standard way of also including its filename, or at least a suggested filename?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Content-Disposition: attachment; filename="picture.jpg". The Content-Type header can also contain a name= attribute although it is not recommended.

I am assuming email, but IIRC the same goes for HTTP.

share|improve this answer
I'm actually dealing with neither email nor HTTP, but rather URIs, feed directly to the browser. That doesn't seem to apply here. –  Randomblue Aug 19 '12 at 21:13
If all you have is bare base64 data then no, there is no way to pass in metadata, unless the image format itself has provisions for this. –  tripleee Aug 19 '12 at 21:25
Do you know of image formats that have provisions for name metadata? –  Randomblue Aug 19 '12 at 22:47
Room for a separate question, perhaps. But it seems that the FlashPix extension for EXIF has something of the sort; see en.wikipedia.org/wiki/… –  tripleee Aug 20 '12 at 3:33
add comment

Your Answer


