I've been using Flash and FileUpload for a while without issue.. are you using the most recent version of the Flash player? I know that there was a bug in one version of the Flash 8 player that wasn't following the specs, but it has been fixed for sometime now. And from what I can tell from your patch is it only stops and exception from being thrown, it would probably be better to catch the exception in your code than to path FileUpload.

But to simply answer your original question if you are on a windows machine change the jar to a zip file and open it up find the file you are replacing and replace it. then rename the file back to a jar. This should work similarly on a Mac, if on *nix then you need to extract the entire jar and replace the file then jar it back up. Here is help on using jar:
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/jar.html
http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/jar.html <-- for any unix flavor including mac osx

pd

badi malik wrote:
Hi Martin,
thanks for getting back to me...here's the problem i'm running into...

i'm using flash to select and upload a file as opposed to using a form in an 
html page.  the problem stems from the way flash is handling the content...so i 
modified the FileUploadBase class at line 336 to this...

               //PATCH:Map headers = parseHeaders(multi.readHeaders());
              Map headers = null;
               try {
                    headers = parseHeaders(multi.readHeaders());
                }catch(MultipartStream.MalformedStreamException e) {
                  return items;
                }

now i want to add it to the jar but have no idea how to do this...

thanks



----- Original Message ----
From: Martin Cooper <[EMAIL PROTECTED]>
To: Jakarta Commons Users List <commons-user@jakarta.apache.org>
Sent: Wednesday, January 24, 2007 1:17:15 PM
Subject: Re: adding patch to jar

Please do not cross-post. I have removed the dev list from this thread.

On 1/24/07, badi malik <[EMAIL PROTECTED]> wrote:
Hello all,
I'm using flash to upload a file using fileUpload classes.  because of
this i've had to patch the FileUploadBase source


Why, and what is the change? Would it make sense to incorporate it into
Commons FileUpload?

and need to recompile it and add it to the jar
file(commons-fileupload-1.1.1)...do
i need to rebuild the whole thing using ant, or can i somehow just add the
one file? I assumed that i needed to rebuild everything so i downloaded ant
and trie that but keep getting instantiation errors.  can anyone tell me
which version of ant i need to use to accomplish this?


FileUpload, like almost all Commons components, is built using Maven, not
Ant. What you need to do to incorporate your change depends on the nature of
your change.

--
Martin Cooper


thanks in advance
b









---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to