//fileUploadFolder - this is optional parameter
String fileUploadFolder =
"public";
String filePath = imageFile.toString(); //path of file you want to upload
ImageData imageData = ImageData("uniqueFileName", filePath,
uniqueId: "uniqueIdToTrackImage", imageUploadFolder: fileUploadFolder);
//result is either amazon s3 url or failure reason
String? result = await AmazonS3Cognito.upload(
bucketName, cognitoPoolId, bucketRegion, bucketSubRegion, imageData,
needMultipartUpload: true);
//once upload is success or failure update the ui accordingly
print(result);
could you please help me with anyone?
thanks in advance.
Error - reason: 'Invalid region type.' bucketSubRegion ---> where I am getting this value?
Code : String bucketName = "app-test-attachments"; String cognitoPoolId = "us-east-1_hXdyKXxXn"; String bucketRegion = "us-east-1"; String bucketSubRegion = "";