The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://transifex.com/wekan/wekan only.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
wekan/packages/wekan-cfs-upload-http/internal.api.md

3.6 KiB

Public and Private API

API documentation automatically generated by docmeteor.


File: "upload-http-client.js" Where: {client}


2MB default upload chunk size Can be overridden by user with FS.config.uploadChunkSize or per FS.Collection in collection options

_taskHandler(task, next)  Client

This method is private

Arguments

  • task {Object}
  • next {Function}

Returns {undefined}

var _taskHandler = function(task, next) { ... upload-http-client.js:15

_errorHandler(data, addTask)  Client

This method is private

Arguments

  • data {Object}
  • addTask {Function}

Returns {undefined}

var _errorHandler = function(data, addTask, failures) { ... upload-http-client.js:49

new UploadTransferQueue([options])  Client

Arguments

  • options {Object} (Optional)

UploadTransferQueue = function(options) { ... upload-http-client.js:60

uploadtransferqueue.isUploadingFile(fileObj)  Client

This method isUploadingFile is defined in UploadTransferQueue

Arguments

File to check if uploading

Returns {Boolean} True if the file is uploading

TODO

* Maybe have a similar function for accessing the file upload queue?

self.isUploadingFile = function(fileObj) { ... upload-http-client.js:90

uploadtransferqueue.resumeUploadingFile(File)  Client

This method resumeUploadingFile is defined in UploadTransferQueue

Arguments

to resume uploading

TODO

* Not sure if this is the best way to handle resumes

self.resumeUploadingFile = function(fileObj) { ... upload-http-client.js:99

uploadtransferqueue.uploadFile(File)  Client

This method uploadFile is defined in UploadTransferQueue

Arguments

to upload

TODO

* Check that a file can only be added once - maybe a visual helper on the FS.File?
* Have an initial request to the server getting uploaded chunks for resume

self.uploadFile = function(fileObj) { ... upload-http-client.js:120

fsHttp.uploadQueue UploadTransferQueue  Client

This property uploadQueue is defined in FS.HTTP

There is a single uploads transfer queue per client (not per CFS)

FS.HTTP.uploadQueue = new UploadTransferQueue(); upload-http-client.js:243

fsFile.resume(ref)  Client

This method resume is defined in prototype of FS.File

Arguments

TODO

* WIP, Not yet implemented for server

This function is not yet implemented for server

FS.File.prototype.resume = function(ref) { ... upload-http-client.js:257