Imports a bulk of files to the Media Manager using external urls.
The bulkImportFile()
function returns a Promise that resolves to an object containing bulk import metadata and an array of imported files' descriptors and metadata.
Returns information about the imported files. Use the parentFolderId
and filePath
parameters to specify in which folder you want each file to be imported.
If no folder is specified, the file is imported to the media-root
folder.
Note: When you import a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about knowing when a file is ready.
To import files, you need to do one of the following for each file:
mimeType
field of the request. For example, mimeType: 'image/jpeg'
.displayName
or url
field of the request. For example, displayName: 'Example Image.jpeg
or url: https://www.example.com/image.jpeg
.Note: If you want to validate the media type, pass the file's expected media type in the optional mediaType
field of the request. For example, mediaType: 'IMAGE'
.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
Information about the files to import.
Options to include the file descriptor in the response.