Assets Upload fails with an error message with bulk content.
Description description
Description
Environment
Experience Manager as a Cloud Service
Issue/Symptoms
Uploading multiple assets to a folder throws the following error.
Resolution 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:
- fileName
- fileSize
- filePath
- 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);
}
}
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f