Report an issue
Class

CKEDITOR.plugins.cloudservices.cloudServicesLoader

classsince 4.9.0

A dedicated uploader type for CKEditor Cloud Services.

Note that this type is defined in the plugin.onLoad method, thus is guaranteed to be available in dependent plugin's beforeInit, init and CKEDITOR.pluginDefinition.afterInit methods.

Filtering

Properties

  • customToken : String

  • readonly

    data : String

    String data encoded with Base64. If the FileLoader is created with a Base64 string, the data is that string. If a file was passed to the constructor, the data is null until loading is completed.

  • readonly

    file : Blob

    File object which represents the handled file. This property is set for both constructor options (file or data).

  • readonly

    fileName : String

    The name of the file. If there is no file name, it is created by using the CKEDITOR.config.fileTools_defaultFileName option.

  • readonly

    id : Number

    If FileLoader was created using CKEDITOR.fileTools.uploadRepository, it gets an identifier which is stored in this property.

  • readonly

    loaded : Number

    The number of loaded bytes. If the FileLoader was created with a data string, the loaded value equals the total value.

  • readonly

    message : String

    The error message or additional information received from the server.

  • readonly

    reader : FileReader

    Native FileReader reference used to load the file.

  • readonly

    responseData : Object

    All data received in the response from the server. If the server returns additional data, it will be available in this property.

    It contains all data set in the CKEDITOR.editor.fileUploadResponse event listener.

  • status : String

    The loader status. Possible values:

    • created – The loader was created, but neither load nor upload started.
    • loading – The file is being loaded from the user's storage.
    • loaded – The file was loaded, the process is finished.
    • uploading – The file is being uploaded to the server.
    • uploaded – The file was uploaded, the process is finished.
    • error – The process stops because of an error, more details are available in the message property.
    • abort – The process was stopped by the user.
  • readonly

    total : Number

    The total file size in bytes.

  • readonly

    uploadTotal : Number

    The total size of upload data in bytes. If the xhr.upload object is present, this value will indicate the total size of the request payload, not only the file size itself. If the xhr.upload object is not available and the real upload size cannot be obtained, this value will be equal to total. It has a null value until the upload size is known.

        loader.on( 'update', function() {
            // Wait till uploadTotal is present.
            if ( loader.uploadTotal ) {
                console.log( 'uploadTotal: ' + loader.uploadTotal );
            }
        });
    
  • readonly

    uploadUrl : String

    The target of the upload.

  • readonly

    uploaded : Number

    The number of uploaded bytes.

  • readonly

    url : String

    The URL to the file when it is uploaded or received from the server.

  • readonly

    xhr : XMLHttpRequest

    Native XMLHttpRequest reference used to upload the file.

Static properties

Methods