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:
- Update your code based on the new code example.
- 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 ofUploadedFile
objects instead of a singleUploadFile
object.- The new
UploadedFile
object contains different properties than the deprecatedUploadFile
object.
Note the following returns mapped to the uploadFiles()
function returns as follows:
url
andmediaId
-->fileUrl
title
-->originalFileName
Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:Promise<UploadFile>
Was this helpful?
Yes
No