locked
read file from hard disk without using filepicker

    Question

  • I have the path of a video file with me, how do I read that file so that i can play that video file inside my app

    Windows.Storage.StorageFile.getFileFromPathAsync(filePath).done(function (complete) {
                console.log('complete  ' + complete);

    var video = $('<video>');

    video[0].src = URL.createObjectURL(complete);

            }, function (error) {
                console.log('error  ' + error);
            }, function (progress) {
                console.log('progress  ' + progress);
            });

    It always poduces error WINRTErroe file access denied


    mayanklohani


    Sunday, March 30, 2014 12:13 PM

Answers

  • how you get the filepath? because the app containers you cant go somewhere on the filesystem without user permission (so need the file picker)

    as soon the user gives you access to a file with the filepicker you can save this access (see accesscache namespace()


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#


    Sunday, March 30, 2014 2:05 PM

All replies

  • how you get the filepath? because the app containers you cant go somewhere on the filesystem without user permission (so need the file picker)

    as soon the user gives you access to a file with the filepicker you can save this access (see accesscache namespace()


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#


    Sunday, March 30, 2014 2:05 PM
  • thanku

    mayanklohani

    • Marked as answer by mayanklohani Sunday, March 30, 2014 4:52 PM
    • Unmarked as answer by mayanklohani Sunday, March 30, 2014 4:52 PM
    Sunday, March 30, 2014 4:52 PM