locked
Windows.Storage.Pickers.FileSavePicker() with property .suggestedStartLocation referencing into subfolder of Windows.Storage.Pickers.PickerLocationId.picturesLibrary

    Question

  • Hello

    I try to get the Storage.Picker working for a suggestedStartLocation in a subfolder name "D1" of the picturesLibrary

    var strokefile = "D1//Test.gif";
      savePicker.suggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.picturesLibrary;
     savePicker.suggestedFileName = strokefile;
     savePicker.fileTypeChoices.insert("GIF with embedded ISF", [".gif"]);
    

    But can's get it working.


    Saturday, June 14, 2014 7:40 PM

Answers

  • The suggested start location can only be one of the standard PickerLocationId locations. You cannot explicitly set the start location to a subfolder.

    The exception is that if you want to default to a specific file for which you already have a StorageFile you can set the SuggestedSaveFile to that file in any location.

    --Rob

    Tuesday, June 17, 2014 3:47 AM
    Owner

All replies

  • Hi Reto05,

    Problem solved?

    Just a simply question, when you want to use the save picker, why not choose the correct folder to save your image?

    And if you know you will save the image in some subfolder of the picture library, why not use code to save the image? ref:Quickstart: Reading and writing files

    Anyway I just test with your code, and seems SuggestedFileName should not contain some special symbols.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    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.

    Tuesday, June 17, 2014 3:04 AM
    Moderator
  • The suggested start location can only be one of the standard PickerLocationId locations. You cannot explicitly set the start location to a subfolder.

    The exception is that if you want to default to a specific file for which you already have a StorageFile you can set the SuggestedSaveFile to that file in any location.

    --Rob

    Tuesday, June 17, 2014 3:47 AM
    Owner
  • Hi James<o:p></o:p>

    I had this \\ in the name because I want to store
    into a subfolder D1 inside the picturesLibrary.<o:p></o:p>

    When I read the answer from Rob then it Looks the
    filepicker is really in a early stage.<o:p></o:p>

    I think a user wants tobe directed
    to the correct folder, it is clear that for security reasons the start can only
    be in special folders, as example the picturesLibrary. But
    inside this the app needs to create folders and the same app wants to direct the user to
    this folder.

    Reto

    Wednesday, June 18, 2014 7:55 PM