I am working code sample and the simple part of it was to be able to use the file picker to open a file in JavaScript and send it to a C# WinRT component where I'll process the file and actually have the main code sample I want to do. The issue is I'm not
sure of how to best to go about the getting my file to the C# component. I have tried the following:
- Use open file picker in JS to choose file, passed file path to component and tried opening file with StorageFile.GetFileFromPathAsync. This results in an access denied error.
- Tried using the file picker in c#. This threw an "unspecified error". I wasn't really expecting this to work anyways.
- I tried passing a file stream but components do not allow streams to be passed through methods.
Also the file extensions/type may be any available type so I don't want to limit it. Any ideas on how to do this?
http://rbrundritt.wordpress.com