I'm building my own web email and want to store email attachments as optimally as possible.
Here are the general guidelines I'm trying to achieve...
1.) It's not a file-sharing service, it's email.
2.) I want to ensure reasonably sized attachments are successfully saved in the database.
3.) I want to minimize the amount of space attachments use in the database.
4.) I want to use neutral SQL approaches so I won't have issues in the future when I migrate from MySQL to PostgreSQL.
5.) What is a reasonable limit? I'm thinking along the lines of 16-25 megabytes tops for a single attachment.
AOL, Hotmail, Gmail, Yahoo and others seem to encode attachments commonly as base64, a text type. Is it more optimal space wise to store attachments as a text or binary type?
I'll be happy to make any on-topic clarifications.