Post
Bulk Import File
Imports a bulk of files to the Media Manager using external urls.
Returns information about the imported files.
Use the parentFolderId
and filePath
parameters to specify the folder you want each file to be imported to.
If no folder is specified, the file is imported to the media-root
folder.
Notes:
- The
media
property isn't returned in thefiles
response object. - 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:
- Pass its MIME type in the
mimeType
field of the request. For example,mimeType: 'image/jpeg'
. - Include its extension in either the
displayName
orurl
field of the request. For example,displayName: 'Example Image.jpeg
orurl: https://www.example.com/image.jpeg
. - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
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'
.
Permission Scopes
For app development, you must have one of the following permission scopes:Manage Bookings Services and Settings
Manage Media Manager
Manage Portfolio
Manage Restaurants - all permissions
Learn more about permission scopes.
Endpoint
POST
https://www.wixapis.com/site-media/v1/bulk/files/import-v2Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No