Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

how to use Xam.plugin.FilePicker?

FraR1097FraR1097 Member ✭✭
edited September 2019 in Xamarin.Forms

Good morning,
I'm trying to use Xam.plugin.FilePicker, on the android it opens the file finder , but it does nothing else,
on IOS does not even open the file finder, it should fill a variable with the file name and it doesn't, how do I solve it?

the code I use is this:

public async void SendFile()
    {
        try
        {
            FileData fileData = await CrossFilePicker.Current.PickFile();

            if (fileData == null)
                return; // user canceled file picking

            string fileName = fileData.FileName;

        }
        catch (Exception ex)
        {
            System.Console.WriteLine("Exception choosing file: " + ex.ToString());
        }

    }

Best Answer

Answers

Sign In or Register to comment.