Class

Adapter (upload/adapters)

@ckeditor/ckeditor5-upload/src/adapters/simpleuploadadapter

class private

Upload adapter.

Filtering

Properties

Methods

  • constructor( loader, options )

    Creates a new adapter instance.

    Parameters

    loader : FileLoader
    options : SimpleUploadConfig
  • abort() → Promise

    Aborts the upload process.

    Returns

    Promise

    Related:

  • upload() → Promise

    Starts the upload process.

    Returns

    Promise

    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

    Native File object.

  • private

    _initRequest()

    Initializes the XMLHttpRequest object using the URL specified as simpleUpload.uploadUrl in the editor's configuration.

  • private

    _sendRequest( file )

    Prepares the data and sends the request.

    Parameters

    file : File

    File instance to be uploaded.