How to get file path on Xamarin.Plugin.FilePicker?

HarshitaHarshita INMember ✭✭✭
edited December 2017 in Xamarin.Forms

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

Sign In or Register to comment.