1. Praveen_Kumar's Avatar
    Is it Possible to retrieve Physical path of Images in Media Library other than using PhotoChoosertask? Please reply
    05-09-2012 01:15 AM
  2. rbrunner's Avatar
    No, and such a path would be of no use anyway: Your app would have no permission to access the file.
    Praveen_Kumar likes this.
    05-09-2012 03:32 AM
  3. Praveen_Kumar's Avatar
    I tried using the path returned by e.OriginalFileName of PhotoChooserTask to set Source of an Image and it seems to be working.

    image1.Source = new BitmapImage(new Uri(e.OriginalFileName));

    but what I actually want is to be able to get filepaths of more than one image at a time.
    Is it Possible?

    Are you sure about the Permission?:dry
    Last edited by Praveen_Kumar; 05-09-2012 at 05:24 AM.
    05-09-2012 05:14 AM
  4. rbrunner's Avatar
    Hmm, looks as if I was a little too fast with my answer, and the usual super-tight WP7 security system has an exception here, probably because it would not make sense to copy the pictures into the app's isolated storage, so read access is granted to the original location.

    Found this thread which might be interesting, especially the MediaLibrary info which may be the basis of your very own picture selection mechanism:
    Get image file name from PhotoChooserTask - App Hub Forums
    05-09-2012 05:51 AM
  5. Praveen_Kumar's Avatar
    I have already seen the above thread. What I was looking for is to retrieve File path not file name.

    Here is the exact requirement:
    I want to create a custom UI and allow the user to select multiple Images(which cannot be done by PhotoChooserTask) from MediaLibrary. Once the user selects I want to retrieve the File paths(tricky part) of all the images selected and store them as Strings for later use.

    Any help regarding this will be appreciated.
    Thank you.:)
    05-09-2012 07:01 AM
  6. rbrunner's Avatar
    You are right, Picture.Name is only the file name, not a complete path, checked myself now to be sure.

    Probably you have also seen this on StackOverflow already.

    Looks all mixed-up and pretty hopeless to me. If you, I and a couple of other people have not found a way so far, there probably isn't any to do what you want - the WP7 API really is still imature and full of holes waiting to be filled.

    I personally try to take such things as an intellectual challenge: Given the many things that are not possible (in your case selecting multiple pictures together), what can I manage to achieve despite these limitations?
    05-09-2012 07:58 AM