You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.
Hi,
I've been trying to use this package for uploading files I pick on device using system's document picker.
It provides access to local files and Google Drive content as well. Most of GD data is not on device but picker returns content://com.google.android.apps.docs.storage/document/... URI, i.e. content:// URIs as well.
Unfortunately, using it for upload result in an error on this line that says something like can't invoke method String.toCharArray() on null object reference.
AFAIU, reading content URIs should be done using ContentResolver object (details here). Example there shows bitmap reading but it's also possible to create input stream from URI to read any type of data (details here, section "Get an InputStream").
It would be great to change content URI handling so that ContentResolver is used when needed.
The text was updated successfully, but these errors were encountered:
Here is my solution. It copies the way bundle-assets:// are handled, but uses ContentResolver.inputStream for stream creation.
Haven't tested all cases (only multipart body case), so didn't make a PR yet.
Hi,
I've been trying to use this package for uploading files I pick on device using system's document picker.
It provides access to local files and Google Drive content as well. Most of GD data is not on device but picker returns
content://com.google.android.apps.docs.storage/document/...
URI, i.e.content://
URIs as well.Unfortunately, using it for upload result in an error on this line that says something like
can't invoke method String.toCharArray() on null object reference
.AFAIU, reading content URIs should be done using
ContentResolver
object (details here). Example there shows bitmap reading but it's also possible to create input stream from URI to read any type of data (details here, section "Get an InputStream").It would be great to change content URI handling so that
ContentResolver
is used when needed.The text was updated successfully, but these errors were encountered: