I need to get the actual path of a picked image using CrossMedia
library .
When I tryd to get the file path using File.Path
I get a temporary path not the actual path.
It also copies the image and gives the image a new name and gives me the path of the copied image with its new name but I need the actual path.
For example
the actual path is : /storage/data/image.jpg
but it returns : /storage/data/image_1.jpg
Here is the code I am using to pick the image :
await CrossMedia.Current.Initialize();
try
{
var file = await CrossMedia.Current.PickPhotoAsync(new PickMediaOptions
{
PhotoSize = PhotoSize.Medium
});
if (file == null) return;
Stream stream = null;
stream = file.GetStream();
string file_path = file.Path;
}
catch (Exception ex)
{
string test = ex.Message;
}