Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

릴리즈 2.10.0 이상

파일 업로드를 위한 사용자 함수를 설정합니다. 이 함수가 설정되어 있으면 내부 파일 업로드 로직을 이용하지 않고 지정된 사용자 함수를 호출합니다.

Parameters:

Name

Type

Description

funcFunction

파일 업로드에 사용될 사용자 함수

Example:

function customUpload(file, fileType) {
    // 파일 업로드 처리
    return url;
}

editor.setCustomUploadFunction(customUpload);

사용자 함수의 정의

사용자 업로드함수는 아래와 같이 정의되어야 합니다.

Parameters:

Name

Type

Description

fileFile

에디터를 통해 업로드할 파일

fileTypeString파일 타입 (image, video, file)

Return:

Type

Description

String브라우저에서 접근 가능한 URL 또는 Path

중요) 사용자정의 업로드 함수에서는 파일 업로드 후 반드시 업로드된 파일에 접근 할 수 있는 URL(또는 Path)을 반환해야 합니다.

Example:

function customUpload(file, fileType) {
    // 파일 업로드 처리
    return url;
}
  • No labels