Package com.example.blogs.app.storage
Class S3KeyGenerator
java.lang.Object
com.example.blogs.app.storage.S3KeyGenerator
Generates S3 object keys by combining file path, name, and extension.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateKey(String filePath, String fileName, String extension) Generates an S3 object key from file components.
-
Constructor Details
-
S3KeyGenerator
public S3KeyGenerator()
-
-
Method Details
-
generateKey
Generates an S3 object key from file components. Ensures proper path separator between path and filename.- Parameters:
filePath- the storage path within the bucketfileName- the file name without extensionextension- the file extension including the dot (e.g., ".png")- Returns:
- the complete S3 object key
-