apache / cordova-plugin-file-transfer

Apache Cordova File Transfer Plugin
https://cordova.apache.org/
Apache License 2.0
597 stars 886 forks source link

CB-10044 FileTransfer plug in can upload parts of a file to implement resumablejs #116

Closed maortega closed 6 years ago

maortega commented 8 years ago

By sending the startByte and endByte to the FileTransfer plugin we are able to upload parts of a file therefore we can integrate this with ResumableJS

stevengill commented 8 years ago

Could you add a test for this new usecase?

maortega commented 8 years ago

Sure, test added.

daserge commented 8 years ago

Hi @maortega, thanks for the contribution! A few notes on this:

daserge commented 8 years ago

Also the test should be extended to verify the data received by the server - it echoes the received file params back so at least we can verify the file length now (see verifyUpload function) and we should also verify the contents IMO.

The server responds back like this now:

{"fields":{},"files":{"file":{"size":17,"path":"C:\\Users\\SERGEY~1.SHA\\AppData\\Local\\Temp\\upload_d2fac85e424cb5bda30b5cb5900978f7","name":"fileToUpload.txt","type":null,"mtime":"2015-11-19T16:38:41.038Z"}}}
stevengill commented 8 years ago

@daserge thoughts on merging this?

daserge commented 8 years ago

@stevengill, There are some questions and proposals on improvement for this PR - I believe they should be addressed first. This is a new feature so it has a lower priority than existing bugs, which I'm looking into now.

daserge commented 8 years ago

Ping @maortega...

2garryn commented 8 years ago

Ping @maortega

ManicMapple commented 6 years ago

Is there an update on this? I want to implement a robust resumable file upload for large files, so reading parts of a file would be great.

maverickmishra commented 6 years ago

With the new features introduced in XMLHttpRequest, this plugin is not needed any more. Migrating from this plugin to using the new features of XMLHttpRequest, is explained in this Cordova blog post.