laziness, impatience, and hubris | |
PerlMonks |
MIME::Lite and pre-encoded Base64 binary databy Pickwick (Beadle) |
on Jun 08, 2012 at 16:11 UTC ( [id://975202]=perlquestion: print w/replies, xml ) | Need Help?? |
Pickwick has asked for the wisdom of the Perl Monks concerning the following question: Hello all, I have a web application with a file upload form which is processing the uploaded data on the server in two ways: One needs to get Base64-data and the other one, which is totally optionally, may has to send a mail with some text and the binary as a attachment afterwards. It is possible and more likely that the first way to process the data has to be repeated for different recipients many times and that the uploaded data is quite big, speaking of maybe even hundreds of MB. In this case it is very unlikely that processing the files for mails is configured. Because of this I decided to encode the binary data directly after the upload to Base64 and afterwards delete the original data to save memory. If the data has to be send by mail it will just get decoded from Base64 to binary and given to MIME::Lite. My question now is if there is a way to give pre encoded Base64 data to MIME::Lite with the original mime type of the file, e.g. "image/png" or else, with MIME::Lite doesn't reencode the given data on its own? It should send a mail with content-transfer-encoding Base64, but directly with my provided Base64 data. After reading the documentation it looks like MIME::lite encodes on its if non-text mime-types are given. Any ideas? Thanks!
Back to
Seekers of Perl Wisdom
|
|