Importing Files

To import files using the Import File or Bulk Import Files endpoints, 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 or url field of the request. For example, displayName: 'Example Image.jpeg or url: 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'.

Was this helpful?
Yes
No