Studyxnet / FilePicker-Plugin-for-Xamarin-and-Windows

FilePicker Plugin for Xamarin and Windows
MIT License
74 stars 52 forks source link

When I try to upload pdf file size is showing me {byte[0]} #36

Closed ShahriatHossain closed 6 years ago

ShahriatHossain commented 7 years ago

I am trying to upload pdf from my android 5.1 device but getting media object like below:

{byte[0]}

"sample.pdf"

"/document/acc=1;doc=14"

can anybody help me whats wrong here? Why pdf is not uploading and file size is 0?

salvador-guerrero commented 7 years ago

This seems to happen when you pick a file from Google Drive

ShahriatHossain commented 7 years ago

@salvador-guerrero no this also happens when try to pick file from download redirectory on android some devices like 5.1 and 6.1 etc. Do you have any solution for this type of problems?

mhallmark commented 7 years ago

This is happening for us as well. DataArray coming back as empty byte array when selecting from google drive and one drive accounts. The file name is correct though.

Samsung Note 5 on API 23 and Google Nexus on API 24.

ShahriatHossain commented 7 years ago

@mhallmark so have you found any solution? Because when I choose file from downloads this is also happening.

mhallmark commented 7 years ago

@ShahriatHossain Unfortunately, no.

gabybonaventura commented 6 years ago

I had had the same problem and i finally solved it using a beta version of FilePicker (Version 2.0.64-beta).

jfversluis commented 6 years ago

Yes, please use the package that is forked from here and actively maintained here: https://github.com/jfversluis/FilePicker-Plugin-for-Xamarin-and-Windows

akoh-victor commented 6 years ago

@gabybonaventura Please iam having an issue using 2.0.64-beta i installed the package from the package manager but my xamarin forms app is not seeing that its install

gabybonaventura commented 6 years ago

@ideal-it-solutions you installed the package on plc project, ios project and android project? If the answer is yes, Try to rebuild all project and restart your visual studio

akoh-victor commented 6 years ago

@gabybonaventura yes i install to Android project and IOS project. android

after installing to both ios and android project. restarted and rebuild my project tried to reference it like this capture and this capture 2

gabybonaventura commented 6 years ago

@ideal-it-solutions Try to include the package with Manage NuGet Package, Search Xamarin.Plugin.FilePicker and include prerelease. Your project is make with Xamarin Forms?

jfversluis commented 6 years ago

If you have any issues with the NuGet package from the repo above, please open an issue there. I won't be going into specifics here.

akoh-victor commented 6 years ago

@gabybonaventura Thank you, that worked for me.