The Upload Media dialogĀ fails to handle upload errors


Description

If an error happens while uploading a file through the Upload Media dialog, the window can freeze instead of displaying the error message.

Solution

To resolve this issue, do the following:

  1. Open the the \sitecore\shell\Applications\Media\MediaFolder\MediaFolder.js file.
  2. Comment out the line marked in bold:
    onUploadError: function(event) {
        console.warn("upload error. file: %s, message: %s", event.id, event.status);
        this.hadErrors = true;
      var row = $(event.id);
        ...
    }
  3. Insert the following line after the commented one:
    var row = this.yUploader.isFlash? $(event.originEvent.id): $(event.details[0].target.id);
  4. Clear the browser cache.