Status | |||||
---|---|---|---|---|---|
|
...
|
...
|
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:
Code Block | ||||
---|---|---|---|---|
| ||||
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 또는 Path |
...
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:
Code Block | ||||
---|---|---|---|---|
| ||||
function customUpload(file, fileType) { // 파일File 업로드upload 처리processing return url; } |