RELEASE 2.10.0 OR ABOVE
Set up a user function for uploading files. When this function is set, the specified user function is called without using the internal file upload logic.
Parameters:
Name | Type | Description |
|---|---|---|
| func | Function | User function to be used for file upload. |
Example:
function customUpload(file, fileType) {
// File upload processing
return url;
}
editor.setCustomUploadFunction(customUpload);
Define User Function
User upload function should be defined as below.
Parameters:
Name | Type | Description |
|---|---|---|
| file | File | File to be uploaded through the editor |
| fileType | String | File type (image, video, file) |
Return:
Type | Description |
|---|---|
| String | URL or path accessible from browser |
Notice) In the user-defined upload function, after uploading the file, the URL (or Path) that can access the uploaded file must be returned.
Example:
function customUpload(file, fileType) {
// File upload processing
return url;
}