Adapter (upload/adapters)
@ckeditor/ckeditor5-upload/src/adapters/simpleuploadadapter
Upload adapter.
Filtering
Properties
-
loader : FileLoader
module:upload/adapters/simpleuploadadapter~Adapter#loader
FileLoader instance to use during the upload.
-
options : SimpleUploadConfig
module:upload/adapters/simpleuploadadapter~Adapter#options
The configuration of the adapter.
Methods
-
constructor( loader, options )
module:upload/adapters/simpleuploadadapter~Adapter#constructor
Creates a new adapter instance.
Parameters
loader : FileLoader
options : SimpleUploadConfig
-
abort() → Promise
module:upload/adapters/simpleuploadadapter~Adapter#abort
Aborts the upload process.
-
upload() → Promise
module:upload/adapters/simpleuploadadapter~Adapter#upload
Starts the upload process.
-
_initListeners( resolve, reject, file )
module:upload/adapters/simpleuploadadapter~Adapter#_initListeners
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()
module:upload/adapters/simpleuploadadapter~Adapter#_initRequest
private
Initializes the
XMLHttpRequest
object using the URL specified assimpleUpload.uploadUrl
in the editor's configuration. -
_sendRequest( file )
module:upload/adapters/simpleuploadadapter~Adapter#_sendRequest
private
Prepares the data and sends the request.
Parameters
file : File
File instance to be uploaded.
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.