Minroud1
Simple serverless image hosting.
$ serverless deploy
endpoint: https://{identifier}.lambda-url.{region}.on.aws
See this get started guide for more detailed instructions.
With cml comment
$ cml comment create --publish --publish-url={endpoint}
$ curl {endpoint} --data-binary @image.png --header "Content-Type: image/png"
https://{bucket}.s3.{region}.amazonaws.com/{hash}
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
-
Named after Yor's Minroud from The Neverending Story. ↩