startUpload( )


Deprecated. This function will continue to work, but a newer version is available. Use the uploadFiles() function instead.

Uploads the file that the site visitor has chosen.

The startUpload() function triggers the upload of the file in the upload button's value property.

Migration Instructions

If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to the new uploadFiles() function:

  1. Update your code based on the new code example.
  2. Test your changes to make sure your code behaves as expected.

Note the following differences between the new uploadFiles() function and the deprecated startUpload() function:

  • uploadFiles() triggers the upload of multiple files instead of a single file.
  • uploadFiles() returns an array of UploadedFile objects instead of a single UploadFile object.
  • The new UploadedFile object contains different properties than the deprecated UploadFile object.

Note the following returns mapped to the uploadFiles() function returns as follows:

  • url and mediaId --> fileUrl
  • title --> originalFileName
Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:Promise<UploadFile>
Was this helpful?
Yes
No