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",
                    Toast.LENGTH_LONG).show();
            return;
        }
        File file = new File(filePath);
        TransferObserver observer = transferUtility.upload(AWSConfiguration.BUCKET_NAME, file.getName(),
                file);
    }
Before uploading I want to resize an image (not on my phone but only on server) to occupy less memory. How to do it?
 
     
    