Closed bachras closed 7 years ago
Hi, @bachras I have tested the sample application (on LG Nexus 5x) with your change for the multi-part upload and it works on my side as expected. Can you clarify on what API level you are testing?
Hi @NickIliev, thank you for reply. I have just tried on Nexus 5 (API 22) and it seems that error doesn't appear on the test app, but nothing is send to server side. Task events are not logging.
I am developing NS Angular app and I still get the same error as I mentioned earlier. Example is based on NS Vanilla JS and my app is Angular. Could that be the reason. If so how could I easily convert to NS Angular. Thanks
@bachras I'm not using the sample app, but I tried your method in a nativescript/angular app I've been building to upload a sqlite database to a node server using multer middleware and it seems to work. I've only tested on android so far (droid 2 turbo).
@bachras one more thing, I did get a similar error to the one you posted after experimenting more with this. My issue was that I had
let params = [{name: "person_id", value: this._peopleService.selectedPerson.person_id}, {name:"file", filename: dbname, mimeType: 'application/x-sqlite3'}];
where this._peopleService.selectedPerson.person_id was a number so I just did this and the error went away
value: this._peopleService.selectedPerson.person_id.toString()
Thanks @jeffswitzer. toString() fixed the problem for me!
A note is added in the README to explicitly specify that the values sent to multipartUpload
method should be strings.
Hi all,
I have tried this plugin with sample app from https://github.com/NativeScript/sample-ImageUpload and it works perfectly fine, but when I tried to change it to multipart upload I get this error on Android (iOS works fine).
In example I just changed this line:
var task = session.uploadFile(fileUri, request);
to this:
Error:
Any help would be appreciated. thanks