Reuse Upload Component after previous upload failed

Hey there,

I got a problem when trying to reuse the upload component after the previous upload with the same upload instance failed. It’s showing the “browse files” dialogue to select a file but the upload is not starting.

It works flawlessly if the previous upload finished correctly.

Any hints?

Thank you,
Kersten

Hi,

How exactly your upload fails? I think the component should be usable after failure. Maybe the client side don’t get at hint that the upload has been terminated unexpectedly and it assumes the upload process is still going on.

cheers,
matti

Upload-Components won’t work after I …interruptUpload() them.

I know it’s not much help, but we use the Upload component repeatedly and it seems to work correctly most of the time, including when we call interruptUpload (which we do for either unexpected MIME type or content-length too big). That is, we have a Form that has the Upload in it, and we can repeatedly upload new files.

We are experiencing somewhat random issues with a “stray” UIDL update message that causes my system to think another item has been clicked in our navigation Tree when the upload is done. It’s odd as it has happened after a successful upload as well as an interrupted upload.

And we had combined Upload with ProgressIndicator, but found the progress indicator would start looping on the polling side. We tried re-creating the ProgressIndicator and doing a layout.replaceComponent to swap out the old with the new, and previously we tried setEnabled(false) in a layout that was no longer visible and even changing the polling interval from (500msec) back to a larger number like 5000msec at the end of an upload (either successful or failure), but after some uploads, it would just start polling ever 500msec like the old component was going strong even though no upload was taking place and we had tried to “turn it off and slow the polling interval down”. We removed the progress indicator and the polling issue is gone, of course, but we lost that feature, though it rarely made much of an appearance anyway.

This happens to us on the latest Vaadin on both FF and Chrome, and both in a standalone website as well as our Eclipse environment.

@David: thanks.

I looked deeper into my problem and realized that my uploads don’t really get interrupted with upload.interruptUpload().

I have a maximum upload size limit of 200 MB. In Chrome, for example, I see that after interrupting the upload the browser still keeps uploading (there’s a browser status bar, which shows me that).

After that (still uploading) upload (which was interrupted long ago) my upload component is reuseable (means it actually starts a new upload and not only shows the browse files dialogue).

I show notifications immediately after I upload.interruptUpload(). They work fine. My progressbar stops to update, which is ok too. But in the background the browser still seems to keep uploading the file. The filesize of the uploaded file doesn’t grow on the server though.

Kersten (using vaadin 6.5.7 and tomcat 6 on squeeze)