Closed maortega closed 6 years ago
Could you add a test for this new usecase?
Sure, test added.
Hi @maortega, thanks for the contribution! A few notes on this:
FileUploadOptions
,startByte
and endByte
params in the POST? I can't see it in the code.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"}}}
@daserge thoughts on merging this?
@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.
Ping @maortega...
Ping @maortega
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.
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.
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