femto-metadata is a simple full stack app that accepts images, uploads to cloudinary and returns its metadata. This project idea was gotten from freeCodeCamp.
- Upload an image https://femto-metadata.glitch.me/api/fileanalyse
A post request is made to https://femto-metadata.glitch.me/api/fileanalyse with the upload file in the file property of the request object. If the file is absent a 400 error is returned. If the file is present a 200 status code is returned with a json object containing the file name, type, size and cloudinary url is returned.
- If the file was present and upload was successful
{
"name": "image name",
"type": "image size",
"size": "image size in bytes",
"img": "secure cloudinary link"
}- if the image is absent
{
"msg": "file not found"
}I'd love your feedback on the API. You can reach me via email or give me a shout out on twitter