Error loading image file to S3 using java SDK SDK

I upload the image file to S3 via the AWS java SDK. Here is my code:

AmazonS3 s3 = new AmazonS3Client(basicAWSCredentials) PutObjectRequest putObj = new PutObjectRequest(bucketName, folderPath, getFile(fileName,fileContentToUpload)); putObj.setCannedAcl(CannedAccessControlList.PublicRead); s3.putObject(putObj); 

it works fine on a Windows system, but the following error appears on linux:

Error message: Cannot calculate MD5 hash: Chrysanthemum.jpg (There is no such file or directory)

+6
source share
1 answer

linux is case sensitive. no windows.

try "ls" and pay attention to the case.

use the same case in your program.

0
source

Source: https://habr.com/ru/post/977697/


All Articles