Skip to content

Amplify Android 1.6.1

Compare
Choose a tag to compare
@richardmcclellan richardmcclellan released this 20 Nov 03:24
1f73dba

Storage

  • Added uploadInputStream API. With the privacy changes in Android 10, clients often don't have easy access to a File anymore, so the existing uploadFile API is not enough. Now, clients are typically working with a URI, which can easily be converted to an InputStream, and passed to the new API (#955).
InputStream inputStream = new ByteArrayInputStream("myData".getBytes());
Amplify.Storage.uploadInputStream(
    "keyForMyData",
    inputStream,
    result -> Log.d("MyApp", "Uploaded InputStream for key: " + result.getKey()),
    error -> Log.e("MyApp", "Error uploading InputStream: ", error));

See the following diff for a complete set of changes since the last release.