Assets Upload fails with an error message with bulk content.

Description description


Experience Manager as a Cloud Service

Uploading multiple assets to a folder throws the following error.

Resolution resolution


This failure can be caused by trying to upload a 0-byte asset as one of the conditions in the below function[ 0] was not met.

Look for any 0-byte files or the other conditions detailed in the following function.[ 0]

Once you remove the 0-byte asset from the containing folder the rest of the assets should be uploaded successfully.

The required conditions when uploading a file are having:

  1. fileName
  2. fileSize
  3. filePath
  4. blob

[ 0]

function ensureRequiredOptions(options) {
                if(!options.fileName || !options.fileSize || (!options.filePath && (!options.blob || !options.blob.slice))) {
                    throw new UploadError('UploadFile missing required fields. Must have fileName, fileSize, and either filePath or blob', ErrorCodes.INVALID_OPTIONS);