Michal - 2014-01-09

I believe there are few issues with flash-based upload.

Firstly the cancellation does not trigger UploadErrorEvent. There's a condition in Uploader.uploadErrorEventCallback which assumes that for cancelled file the error event has been fired already but this is not true for swfupload.

Also we had issues with setting uploadUrl to the Uploader. For unknown reason the flash object is not initialized at certain stage (missing CallFunction method) and generates exception. I saw somewhere in swfupload.js forum a solution to postpone the setting which also worked for us.

new Timer() {
  @Override
  public void run() {
    uploader.setUploadURL(uploadUrl);
  }
}.schedule(1000);