Describe the bug
Precondition :
android.permission.WRITE_EXTERNAL_STORAGE and android.permission.READ_EXTERNAL_STORAGE
Now When we are trying to upload the image, it is throwing error saying that
"Unable to calculate MD5 hash: /storage/emulated/0/WhatsApp/Media/WhatsApp Images/**.jpg: open failed: EACCES (Permission denied)"
To Reproduce
Your code
File file = new File(localFilePath);
mTransferUtility.upload(s3Credential.bucketName, s3Credential.dirName + "/" + uploadInfo.fileName, file);
Expected behaviour
It should upload the file irrespective of Android SDK version
Environment Information (please complete the following information):
Additional context
Should we create a temporary file [using ParcelFileDescriptor] from original path and pass the file object to upload method or library should have provision to pass Uri object and it will take care of all the necessary things for uploading?
Yeah for now you'd need to create a Temporary file - adding support for the stream is a feature request that's definitely on our radar.
Most helpful comment
Yeah for now you'd need to create a Temporary file - adding support for the stream is a feature request that's definitely on our radar.