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:

  • _initListeners( resolve, reject, file )

    private

    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.

  • _initRequest()

    private

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

  • _sendRequest( file )

    private

    Prepares the data and sends the request.

    Parameters

    file : File

    File instance to be uploaded.