Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status
colourYellow
title

...

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

funcFunction

파일 업로드에 사용될 사용자 함수User function to be used for file upload.

Example:

Code Block
languagejs
themeEmacs
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

fileFile

에디터를 통해 업로드할 파일File to be uploaded through the editor

fileTypeString파일 타입 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
languagejs
themeEmacs
function customUpload(file, fileType) {
    // 파일File 업로드upload 처리processing
    return url;
}