Closed relez closed 5 years ago
Hi @relez ,
Can you share with my the details of your setup:
Hi @VladimirAmiorkov, I am testing on iOS, I havent tried Android yet.
I hope this helps!
Hi @relez ,
Thank you for providing the additional information. I tried to reproduce this issue in this repository demo application but to no avail. Uploading an .m4v file was correctly uploaded to the "server" that is started in the demo app.
Can you send us an sample project that reproduces this issue or change the demo code in a way that it reproduces it and share it with us via a fork or directly by code snippet.
Hi again, I have prepared a sample proyect, I hope it helps.
https://github.com/relez/ns-video-upload-ng.git
Thanks!
Hi @relez, thank you for the sample project!
The issue you are hitting inside is iOS, disabling all unsecured HTTP traffic. All you need is to add the following code to the Info.plist
file in [the app]/App_Resources/iOS:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Have in mind that this is OK for testing. For production, however, it is best to use services using https. You can see the same done in the demo project of the plugin. Hope this helps!
closing due to inactivity
Hi there, I am trying to upload a video using nativescript-background-http. I am also using nativescript-mediafilepicker plugin to select the video and get the path of the file and pass it to the uploader. My code looks like this:
The responseCode I get is -1 and response as NULL. Any idea what could be happening? The video is only 14 seconds which is not too big.
Thanks!