Reputation: 143
I have a problem when I try access a file where is project's assets folder. I can't access it.
Can you help me ?
My ts is:
var fileName = "assets/Atiye.mp4";
this.file.checkFile(this.file.applicationStorageDirectory, fileName)
.then((result) => {
alert('file exists :' + result);
},(error)=>{
alert('error : ' + JSON.stringify(error));
});
The directory is like that:
and error is :
Upvotes: 2
Views: 3289
Reputation: 109
Where is your TypeScript file located? I assume it is in the /app folder.
Therefore (even if I don't think that you can directly play the video) to get to your file you should do:
var fileName = "../assets/Atiye.mp4";
Upvotes: 2