Search code examples
mime

Include filename in MIME base64 encoding


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?


Solution

  • 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.