I am trying to make a servlet to receive a file with FileUpload, and then send out an e-mail with the received file as an attachment.
The FileItem does not provide a way to get a DataSource out of it, which is required by the JavaMail's MimeBodyPart.
Is there any way?
The FileItem's API documentations seem to hint the solution, but I do not quite get the idea.
"While this interface does not extend javax.activation.DataSource per se (to avoid a seldom used dependency), several of the defined methods are specifically defined with the same signatures as methods in that interface. This allows an implementation of this interface to also implement javax.activation.DataSource with minimal additional work."
Do we have an easy solution here? I think it is one of the common applications of the commons-fileupload.
Thank you very much.
Best Regards, Tony Cheung
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
