Class S3UploadAction
- All Implemented Interfaces:
Comparable<S3UploadAction>
Bean property config can be set directly on the handler in your inversion.properties files but you should really consider this to be a service singleton where the properties can be passed in via Action config allowing a single handler instance to upload files to multiple buckets based on request path.
So instead of config-ing something like
handler.dynamicBasePath=yyyy/MM/dd or handler.bucket=somebucket
do this
action.config=dynamicBasePath=yyyy/MM/dd@amp;bucket=somebucket
While accessKey/secreKey/awsRegion CAN be set either on the Handler or on the Action in this way, if you control the host environment and are uploading everyting to your own AWS account, you should consider using IAM roles to authenticate. Than way you don't need to config the credentials at all.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.inversion.Rule
io.inversion.Rule.RuleMatcher -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final Stringprotected final Stringprotected final Stringprotected final Stringprotected final StringFields inherited from class io.inversion.Rule
configMap, configStr, excludeMatchers, excludeOn, includeMatchers, includeOn, log, name, order -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.inversion.Action
doDelete, doGet, doPatch, doPost, doPut, run0Methods inherited from class io.inversion.Rule
checkLazyConfig, compareTo, doLazyConfig, getAllExcludePaths, getAllIncludePaths, getConfig, getConfig, getConfigKeys, getDefaultIncludeMatch, getExcludeMatchers, getIncludeMatchers, getName, getOrder, match, matches, matches, toString, withConfig, withExcludeOn, withExcludeOn, withExcludeOn, withIncludeOn, withIncludeOn, withIncludeOn, withName, withOrder
-
Field Details
-
s3AccessKey
-
s3SecretKey
-
s3AwsRegion
-
s3Bucket
-
s3BasePath
- See Also:
-
s3DatePath
- See Also:
-
-
Constructor Details
-
S3UploadAction
public S3UploadAction()
-
-
Method Details
-
run
public void run(io.inversion.Request req, io.inversion.Response res) throws io.inversion.ApiException - Overrides:
runin classio.inversion.Action<S3UploadAction>- Throws:
io.inversion.ApiException
-