Amplify Android 1.6.1
Storage
- Added
uploadInputStreamAPI. With the privacy changes in Android 10, clients often don't have easy access to aFileanymore, so the existinguploadFileAPI 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.