Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Attaching uploaded file to email in portlet
I am working on another portlet is basically a form with 20 or so fields. One of them is a file upload field. I know how to access the form fields on the backend and generate a body with those values BUT, I'm unsure how to attach the file.
Optimally, I want to attach the uploaded file directly, without saving it but I'm unsure how to do that.
Can that be done? If so, can someone point me to any example code?
Thank you!
Optimally, I want to attach the uploaded file directly, without saving it but I'm unsure how to do that.
Can that be done? If so, can someone point me to any example code?
Thank you!
Hi John,
Yes, you can do it by creating just temp file from request.
Then just attached that temp file into mail. That's it.
Thank you!!
Yes, you can do it by creating just temp file from request.
Then just attached that temp file into mail. That's it.
Thank you!!
John CressmanNo pun intended, just a great opportunity to link this great repository of knowledge ;)
Can that be done? If so, can someone point me to any example code?
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™