The files get uploaded just fine in my app, but no progress is tracked. It's definitely hard to verify if the progress bar works in the example sites, with a limit of 100k, I haven't tried throttling my upload speed, I guess I should try that next.
-Valentin On Feb 2, 2011, at 2:20 PM, Michael O'Cleirigh wrote: > Hello, > > Have you looked at the wicket 1.4 examples here: > http://wicketstuff.org/wicket14/upload (this is the source into the github > mirror: https://github.com/apache/wicket/tree/wicket-1.4.x/wicket-examples) > > I tried both and they work to upload I'm not sure on the progress bar as I > used a file that was too small and it blinked by. > > The upload limit in the 1.4 example is 100k but yours in 1 GB which could be > why your upload test is failing. > > Regards, > > Mike >> Hi I've been beating my head against the wall with this. >> >> I'm overriding newWebRequest in my Application class: >> @Override >> protected WebRequest newWebRequest(HttpServletRequest servletRequest) >> { >> return new UploadWebRequest(servletRequest); >> } >> >> Here is the code in my upload panel class: >> Form<Void> uploadform = new Form<Void>("fileUploadForm") { >> @Override >> protected void onSubmit() { >> final FileUpload upload = >> fileUploadField.getFileUpload(); >> if (upload != null) { >> try { >> File newFile = new >> File(uploadFolder, upload.getClientFileName() ); >> // Save to new file >> newFile.createNewFile(); >> upload.writeTo(newFile); >> _processSelection(server, >> newFile, destFolder); >> } catch (Exception e) { >> throw new >> RuntimeException("Unable to write file"); >> } >> } else { >> throw new RuntimeException( "file >> selected for upload is empty" ); >> } >> } >> }; >> uploadform.setMultiPart(true); >> uploadform.setMaxSize(Bytes.gigabytes(1)); >> >> uploadform.add(fileUploadField = new >> FileUploadField("fileInput")); >> uploadform.add(new UploadProgressBar("progress", uploadform)); >> uploadform.add( new UploadValidator(fileUploadField, prefix) ); >> add( uploadform ); >> >> >> This is based on the examples, the examples themselves are not working for >> me either: >> I tried, http://wicketstuff.org/wicket13/upload and >> http://www.wicket-library.com/wicket-examples/upload/ (the latter URL kinda >> works, it increments the remaining time but does not track the progress) >> >> What am I doing wrong >> >> -Valentin >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org