Create own Provider instance for createStreamedFileAsync RRS feed

  • Question

  • Creating a StorageFile using createStreamedFileAsync I always get "app" as the provider for the file. I would however like to mark files coming from my cloud storage app with my own provider? It seems not possible. Well, OneDrive does it, but its using private API I guess.
    Wednesday, March 19, 2014 11:26 PM

All replies

  • Hi pkursawe,

    Good question, I can only see following words from StorageProvider class MSDN documentation:

    Contains info about the service that stores files and folders. Files and folders may be stored either by the local file system or by a remote  service like Microsoft OneDrive.

    However I'm interested with the "service like", somehow means we should be able to add another StorageProvider. Then I found some interesting documentations, take a look at the Set-StorageProvider. It is a kind of system level stuff. 

    However I think this question might be out of Windows Store App dev forum scope, the WinRT does not provide any API for you to create own provider.


    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, March 20, 2014 6:33 AM
  • Thanks James, which forum you think would be better suited for this question?
    Thursday, March 20, 2014 2:33 PM
  • interessing question and been working on it too now.

    fileuipickerui is accepting IStorageFile; so i tried to make a own implementation of it, now it gets stuck with returning an own StorageProvider.

    but when adding my own implemenation of IStorageFile also getting an InvalidCastException runtime. so not working neither

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Thursday, March 20, 2014 3:09 PM
  • Of course the cast exception comes from the fact that your class is not implementing the COM interfaces WinRT is expecting the class to have.
    Thursday, March 20, 2014 10:09 PM