Package formflow.library.file
Class S3CloudFileRepository
java.lang.Object
formflow.library.file.S3CloudFileRepository
- All Implemented Interfaces:
CloudFileRepository
@Service
@Profile("!test")
public class S3CloudFileRepository
extends Object
implements CloudFileRepository
This is an implementation of the
CloudFileRepository that uses Amazon S3-
Constructor Summary
ConstructorsConstructorDescriptionS3CloudFileRepository(String accessKey, String secretKey, String s3BucketName, String region) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidTakes a filepath and Multipart file to upload the multipart file to AWS S3 where the filepath acts as the path to the file in S3.
-
Constructor Details
-
S3CloudFileRepository
-
-
Method Details
-
upload
Takes a filepath and Multipart file to upload the multipart file to AWS S3 where the filepath acts as the path to the file in S3. File paths that include "/" will create a folder structure where each string prior to the "/" will represent a folder.- Specified by:
uploadin interfaceCloudFileRepository- Parameters:
filePath- File path representing a folder structure and path to the file in S3.file- The multipart file to be uploaded to S3.
-
get
- Specified by:
getin interfaceCloudFileRepository
-
delete
- Specified by:
deletein interfaceCloudFileRepository- Throws:
com.amazonaws.SdkClientException
-