Save video from url to your device

video

#1

Hi,
I want to save a video from a given url into my device.i am using http.getFile for getting the data.currently i am not able to save the response video in the device and to play the same.Here is a sample to my code.

http.getFile({ url: “http://millasays-apollo-dev.azurewebsites.net/api/v1/files/QxWHzZMJxGwJ7cxid5QJ6D8TAudGano0vICBeX16nR9cGiAaYzyJWkyNyDHE5GtJc6YyavDFETfoDgNcuCrlyedKUyNbQwBhiz9KKLAmwsFDFJJRzoU3YIV7cOdlilzR.mp4”, method: “GET”,headers: { ‘Authorization’: ‘Bearer ’ + token } }).then(function (response) {
let folder = fs.knownFolders.documents().path;
let fileName = ‘mila’+’.mp4’;
this.picturePath = fs.path.join(folder, fileName);
let saved = response.saveToFile(this.picturePath, “mp4”);
console.log(saved);
// return img;
}, function (e) {
console.log(“error”);
})