Class S3UploadAction

java.lang.Object
io.inversion.Rule<A>
io.inversion.Action<S3UploadAction>
io.inversion.s3.S3UploadAction
All Implemented Interfaces:
Comparable<S3UploadAction>

public class S3UploadAction extends io.inversion.Action<S3UploadAction>
Sends browser multi-part file uploads to a defined S3 location

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

    Fields
    Modifier and Type
    Field
    Description
    protected final String
     
    protected final String
     
    protected final String
     
    protected final String
     
    protected final String
     
    protected final String
     

    Fields inherited from class io.inversion.Rule

    configMap, configStr, excludeMatchers, excludeOn, includeMatchers, includeOn, log, name, order
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run(io.inversion.Request req, io.inversion.Response res)
     

    Methods inherited from class io.inversion.Action

    doDelete, doGet, doPatch, doPost, doPut, run0

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • S3UploadAction

      public S3UploadAction()
  • Method Details

    • run

      public void run(io.inversion.Request req, io.inversion.Response res) throws io.inversion.ApiException
      Overrides:
      run in class io.inversion.Action<S3UploadAction>
      Throws:
      io.inversion.ApiException