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
- fileObj {FS.File}
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
- File {FS.File}
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
- File {FS.File}
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