Class

UploadAdapter (adapter-ckfinder)

@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter

class private

Upload adapter for CKFinder.

Filtering

Properties

  • loader : FileLoader

    FileLoader instance to use during the upload.

  • t : Locale#t

    Locale translation method.

  • url : String

    Upload URL.

Methods

  • constructor( loader, url, t )

    Creates a new adapter instance.

    Parameters

    loader : FileLoader
    url : String
    t : Locale#t
  • abort()

    Aborts the upload process.

    Related:

  • upload() → Promise.<Object>

    Starts the upload process.

    Returns

    Promise.<Object>

    Related:

  • private

    _initListeners( resolve, reject, file )

    Initializes XMLHttpRequest listeners.

    Parameters

    resolve : function

    Callback function to be called when the request is successful.

    reject : function

    Callback function to be called when the request cannot be completed.

    file : File

    File instance to be uploaded.

  • private

    _initRequest()

    Initializes the XMLHttpRequest object.

  • private

    _sendRequest( file )

    Prepares the data and sends the request.

    Parameters

    file : File

    File instance to be uploaded.