You would probably get a better response on servlet-interest if you
specified "without writing to the server's filesystem" rather than
"without uploading the file to the server".  Obviously, you cannot
upload the file without uploading it.

Maybe there is some javascript trick you can use with a mailto link that
will cause an attachment client-side.

If you want to perform the work on the server (buffering the upload in
memory without touching the filesystem), you can use the extension I
wrote to Jason Hunter's com.oreilly.servlet upload code.  It's part of
the image gallery sample j2ee application for the Maverick MVC framework
(http://mav.sourceforge.net and http://mav.sourceforge.net/pig).  The
important bits of code are SafeMultipartFilter and SafeMultipartWrapper
in this directory:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mav/pig/src/java/org/info
hazard/pig/web/servlet/

Also, it sounds like JH is going to refactor the base code in some
manner, so you might want to ask him about that.

Jeff Schnitzer
[EMAIL PROTECTED]

> -----Original Message-----
> From: Roland Dong [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 22, 2002 1:02 PM
> To: Jeff Schnitzer
> Subject: Could you help?
> 
> Hi, Jeff:
> 
> Someone suggests that I contact you with regard to a problem I have
with
> email attachment.
> 
> Basically, I am writing a jsp program in which user can send file as
email
> attachment.  The problem is that  users are not allowed to upload file
> from
> their local machine to the server.  I am trying to figure out a way to
> write
> a program which sends out the email attachment WITHOUT first uploading
the
> file to the sever.
> 
> In your posting to SERVELET-INTEREST, you talked about the idea to
store
> the
> uploaded file in memory rather than writing it to disk. I am wondering
if
> that idea could be used to solve my problem.  So, instead of  having
the
> file stored in the file system in the server, Is it possible to store
the
> uploaded file to a memory and then send it out?
> 
> I am really stuck on this.  If you could help I would greatly
appreciate
> it!
> 
> Thanks in advance,
> 
> Roland

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to