Skip to content

iterative/minroud-s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minroud1

Simple serverless image hosting.

Deployment

$ serverless deploy
endpoint: https://{identifier}.lambda-url.{region}.on.aws

See this get started guide for more detailed instructions.

Usage

$ cml comment create --publish --publish-url={endpoint}

With curl

$ curl {endpoint} --data-binary @image.png --header "Content-Type: image/png"
https://{bucket}.s3.{region}.amazonaws.com/{hash}

Overwriting files

Storage is content-addressable by default, naming objects after their contents' SHA-256 hash. To return a static/unchanging URL (even after overwriting an object's contents) provide a Content-Seed header; objects will be named after this header's SHA-256 hash instead.

$ curl {endpoint} --data-binary @file_v1 --header "Content-Seed: $(uuidgen)"
https://{bucket}.s3.{region}.amazonaws.com/8da7...2297
$ curl {endpoint} --data-binary @file_v2 --header "$_"
https://{bucket}.s3.{region}.amazonaws.com/8da7...2297

Warning If using Content-Seed, use a cryptographically secure value to prevent unauthorized users from reading/overwriting the uploaded files.

Footnotes

  1. Named after Yor's Minroud from The Neverending Story.

About

Simple serverless image hosting

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages