Re: File upload using WebWork
"Markus Wallner" <[email protected]> Wed, 5 May 2004 12:28:37 +0200
| Newsgroups | gmane.comp.java.open-symphony.devel |
|---|---|
| Message-ID | <000901c4328b$b9fb3eb0$0264a8c0@at> |
Hi! Thanks for the reply. Well, there might be several reasons why a file has not been uploaded. For example, the network connection could have failed or the file size was higher than the limit in the property file. It would be nice to get to know about such (and other) errors, so that the user can be informed accordingly. Otherwise, I just have to print an error message: "the file could not be uploaded", but the reason remains unclear. Moreover, I think it would be a good idea to update the documentation. (yes, i know that is a extremely boring work) But at the same time, it's frustrating for the developer who wants to invoke a method, which then does not exist. But apart from that, WebWork is really great to use so far. I give my credits to all who contributed to it. Regards, - Markus ----- Original Message ----- From: "Hani Suleiman" <[email protected]> To: <[email protected]> Sent: Tuesday, May 04, 2004 4:23 PM Subject: Re: [Opensymphony-developers] File upload using WebWork > What errors are you looking for? I think anything that can go wrong is > fairly internal, so ultimately all you need to check from your end is > if the expected files are null or not. > > On May 4, 2004, at 2:08 AM, Markus Wallner wrote: > > > Hi! > > > > Thanks for the tip - that was the mistake. > > > > I suggest to add to the documentation that the > > webwork.multipart.maxSize is > > in bytes. It does not say so anywhere. > > > > If someone knows the reason for my other problem -- > > that method multiwrapper.hasErrors() does not exist > > > > if (multiWrapper.hasErrors()) { > > Collection errors = multiWrapper.getErrors(); > > Iterator i = errors.iterator(); > > while (i.hasNext()) { > > addActionError((String) i.next()); > > } > > return ERROR; > > > > ... then I will appreciate an answer as well, since I can't do error > > checking at the moment. > > > > Thanks & regards, > > - Markus > > > > > > > > ----- Original Message ----- > > From: "Hani Suleiman" <[email protected]> > > To: <[email protected]> > > Sent: Tuesday, May 04, 2004 3:19 AM > > Subject: Re: [Opensymphony-developers] File upload using WebWork > > > > > >> Check that you aren't uploading attachments larger than the allowed > >> size. You can modify the maximum size allowed by changing a property > >> in > >> webwork.properties (which I don't remember offhand, the default is > >> something like 2mb). > >> > >> On May 3, 2004, at 9:19 AM, Markus Wallner wrote: > >> > >>> Hi! > >>> > >>> I would like to use the integrated MultiPartRequest-Servlet from > >>> WebWork > >>> (v.1.4). > >>> > >>> I followed the instructions > >>> (http://www.opensymphony.com/webwork/cookbook/ > >>> Handling_file_uploads.html) > >>> and copied the sourcecode given there into my application. > >>> > >>> First, I would like to say that the method multiwrapper.hasErrors() > >>> ... > >>> > >>> if (multiWrapper.hasErrors()) { > >>> Collection errors = multiWrapper.getErrors(); > >>> Iterator i = errors.iterator(); > >>> while (i.hasNext()) { > >>> addActionError((String) i.next()); > >>> } > >>> return ERROR; > >>> } > >>> > >>> does NOT exist. > >>> > >>> Second, it seems like I can only upload certain files. > >>> For example, TXT or ZIP files work, but not MP3 files. > >>> > >>> What's the reason behind that? > >>> > >>> Thanks in advance, > >>> - Markus > >>> > >>> > >>> > >>> > >>> ------------------------------------------------------- > >>> This SF.Net email is sponsored by: Oracle 10g > >>> Get certified on the hottest thing ever to hit the market... Oracle > >>> 10g. > >>> Take an Oracle 10g class now, and we'll give you the exam FREE. > >>> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > >>> _______________________________________________ > >>> Opensymphony-developers mailing list > >>> [email protected] > >>> https://lists.sourceforge.net/lists/listinfo/opensymphony-developers > >>> > >> > >> > >> > >> ------------------------------------------------------- > >> This SF.Net email is sponsored by: Oracle 10g > >> Get certified on the hottest thing ever to hit the market... Oracle > >> 10g. > >> Take an Oracle 10g class now, and we'll give you the exam FREE. > >> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > >> _______________________________________________ > >> Opensymphony-developers mailing list > >> [email protected] > >> https://lists.sourceforge.net/lists/listinfo/opensymphony-developers > >> > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: Oracle 10g > > Get certified on the hottest thing ever to hit the market... Oracle > > 10g. > > Take an Oracle 10g class now, and we'll give you the exam FREE. > > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > > _______________________________________________ > > Opensymphony-developers mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/opensymphony-developers > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Opensymphony-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensymphony-developers > ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click