Skip to content

Go packages to create and sign policies for browser-based file uploads to AWS S3

License

Notifications You must be signed in to change notification settings

brianfoshee/s3post

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status GoDoc

Package s3post signs POST policy documents for browser-based file uploads to AWS S3. More details on browser-based file uploads can be found in the AWS docs.

Both s3post and policy packages use only stdlib deps, no aws sdk required.

Usage

To use this package, generate a POST policy document then pass that policy into the Sign method to receive a signature to be used in a POST form.

Details on Policy documents can be found in the AWS docs.

The policy package can be used to generate these documents if necessary.

p := s3post.New("us-east-1", secret)
encoded, signed := p.Sign(policyBytes)

See the examples folder for complete usage.

Signature details

The policy document is signed using this calculation:

Signature Calculation

About

Go packages to create and sign policies for browser-based file uploads to AWS S3

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages