Amplify Android 1.6.1
Storage
- Added
uploadInputStream
API. With the privacy changes in Android 10, clients often don't have easy access to aFile
anymore, so the existinguploadFile
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.