locked
Avoiding to select skydrive files by the FileOpenPicker RRS feed

  • Question

  • Hi,

    Is it possible to avoid of selecting SkyDrive files using FileOpenPicker?

    This is my code:

    FileOpenPicker open = new FileOpenPicker();
                open.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
                open.ViewMode = PickerViewMode.Thumbnail;

                // Filter to include a sample subset of file types
                open.FileTypeFilter.Clear();
                open.FileTypeFilter.Add(".bmp");
                open.FileTypeFilter.Add(".png");
                open.FileTypeFilter.Add(".jpeg");
                open.FileTypeFilter.Add(".jpg");

                // Open a stream for the selected file
                StorageFile file = await open.PickSingleFileAsync();

    I' don't want that the user can select also skydrive files.

    Is it possible in any way?

    Thanks

    Tuesday, January 14, 2014 5:04 PM

All replies

  • No, the user can choose any location she desires.

    Why do you not want SkyDrive? What is the scenario?

    Tuesday, January 14, 2014 5:09 PM
    Moderator
  • Because I need to have the stream Object of the image and store it in blob format inside a database table and I'm not be Able to do it.

    Any suggestione?

    Tuesday, January 14, 2014 6:38 PM
  • You should let the user choose files from SkyDrive and use them if available. See Quickstart: Determining availability of SkyDrive files .

    Blocking SkyDrive is not friendly to your users and won't fix your app: problems reading from SkyDrive will likely also affect other file sources, so the app needs to be able to gracefully handle errors.

    In any case, there is no way to prevent the user from browsing the Picker to any location they can read.

    --Rob

    Wednesday, January 15, 2014 3:19 AM
    Moderator
  • Ok but in this way I can only to check if the file is available or not.If I want to download the file I should use LiveSDK package? Is there somewhere any example?

    Thanks

    Wednesday, January 15, 2014 6:32 AM