How to get file path on Xamarin.Plugin.FilePicker? I am getting file name and byteData but how to get file path? Here is my code-
try { FileData filedata = new FileData(); var crossFileData = CrossFilePicker.Current; filedata = await crossFileData.PickFile(); byte[] data = filedata.DataArray; string name = filedata.FileName; AtttchFileName.Text = name; if(AtttchFileName.Text==null) { DoneAttachment.IsEnabled = false; } else { DoneAttachment.IsEnabled = true; } foreach (byte b in filedata.DataArray) { string attachment = b.ToString(); } } catch (Exception ex) { string msg = ex.Message; }
How to achieve this?
Answers
Check out this post, it seems to use a FilePath
how to implement file picker in Xamarin forms?
You can use filedata.FilePath