Simple cdn template for AWS S3 buckets. It allows upload and get image.
- Clone with
https://github.com/kaanersoy/s3-cdn.git
- Run
yarn
- Change
.env.example
->.env
and fill the informations.
There should be a file
with multipart formdata request.
It will upload the file exact same name.
It will get the image with original width and heigth.
But there is a resize
option in this route
/image/:imageName?resize={width},{height}
for example you can use it like this for don't corrupt the aspect ratio.
/image/:imageName?resize=150,x
x
character is our escape character.