0

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?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.