Can't upload non-local files with content:// URIs #381
Description
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.