locked
Can Windows.System.Launcher be used to launch files stored in the cloud?

    Question

  • Given I have my own cloud storage provider and give the user access to his data on the cloud via the FilePicker contract. How would the Windows.System.Launcher play nicely in such scenario? I see it always expects a IStorageFile as parameter or an URI. What happens when it gets an URI, does it try to download the file locally first and then calls the system default application with this temporary file?

    Could I construct a JS object that mimics the IStorageFile interface or does the Launcher not accept "if it quacks like a duck its a duck" type JS objects?

    Tuesday, April 3, 2012 4:52 PM

Answers

  • phil, windows in general works by downloading a file from a given link to a temporary file then using the default program to open it....if you write the file to the hard drive & point to that file to start then it will work just fine regardless...

    I don't quite understand the question because it of course has to have the file in some manner to well, you know...read it...so that means either a temporary file or it's written to the hard drive explicitly...

    Unless the program handling it is passed paremeters that tells it the file & the program implements it in such a way that the download is only saved to a memorystream or the downloaded file is immediately deleted & only used in memory after the initial download then you can't get around there having to be a file....the temporary files method at least would make it do disk cleanup & clearing out internet files from IE clears out the temp file created when starting from the URI of some file on the web....

    However handling saving the files yourself would allow you to allow offline access to files & make it so re-downloading isn't necessary after downloading something once.

    • Marked as answer by Bob_Bao Monday, May 7, 2012 10:20 AM
    Thursday, April 5, 2012 5:05 AM