John Leszcz John Leszcz - 4 months ago 21x
Android Question

Android uploading image AWS- resize

I upload files to AWS S3 server wth that code:

private void beginUpload(String filePath) {
if (filePath == null) {
Toast.makeText(this, "Could not find the filepath of the selected file",
File file = new File(filePath);
TransferObserver observer = transferUtility.upload(AWSConfiguration.BUCKET_NAME, file.getName(),


Before uploading I want to resize an image (not on my phone but only on server) to occupy less memory. How to do it?


assuming yout file is bitmap lets create Bitmap object like HERE and then resize it like HERE. Create new file with resized bitmap like HERE, send it and remove file on the end.