Package com.example.blogs.app.storage
Class S3BucketLinkBuilderProd
java.lang.Object
com.example.blogs.app.storage.S3BucketLinkBuilderProd
- All Implemented Interfaces:
FileLinkBuilder
@Service
@Profile("prod")
public class S3BucketLinkBuilderProd
extends Object
implements FileLinkBuilder
Production implementation of FileLinkBuilder for constructing S3 file access URLs.
Active only in the production profile.
-
Constructor Summary
ConstructorsConstructorDescriptionS3BucketLinkBuilderProd(String s3BaseUrl) Constructs S3 link builder with resolved base URL and bucket configuration. -
Method Summary
-
Constructor Details
-
S3BucketLinkBuilderProd
Constructs S3 link builder with resolved base URL and bucket configuration.- Parameters:
s3BaseUrl- the S3 base URL from configuration
-
-
Method Details
-
buildLink
Builds a complete S3 URL for accessing a file. Combines base URL, bucket name, file path, UUID, and extension.- Specified by:
buildLinkin interfaceFileLinkBuilder- Parameters:
filePath- the storage path of the fileuuid- the unique identifier of the filefileExtension- the file extension including the dot (e.g., ".png")- Returns:
- the complete S3 file access URL
-