----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
On Sun, 24 Oct 1999, Durga Panda wrote:
> Have anyboby used multipart/form-data to upload pictures to byte[];
> I know jason hunter's example does upload pics into a file; but when we use
> it after little change in implementation to store in any array it creates an
> arry;but it is not the EXACT bytes and the pic is not visible.
>
I think this may be because Jason's implementation of his multipart
handling classes put the data into Strings IIRC, which AFAIK don't
necessarily work well for holding binary data.
I put together a set of multipart request handling classes that are in the
Java Apache project's CVS in the jserv_utils module; check out
README.multi in CVS for more info. These classes suffer from the same
problem that Jason's do (corrupting binary uploads); I've been meaning to
fix that over the last few months, but haven't had the time (or need) to
in my current projects. I may get a chance to work on this in the next few
months, but until then, maybe you can take a look and contribute a patch
that will fix this?
> Ex: we had a pic of 328k size.
> When we upload and save in a file using jason's example it creates an EXACT
> file ( meanse if we open it shows the pic)
> but when we change that to store in an array and then open it; it doesnot
> show the pic( basically meaning it has messedup bytes somewhere)
>
> can anybody point where to look for uploading to an array rather than a
> file...
>
The multipart request classes that I mentioned above allow you to upload
in memory rather than to files, so it's probably along the lines of what
you want.
-Greg-
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]