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)
source share