brodigan-e / capstone-POV

NEU Capstone Project
MIT License
2 stars 1 forks source link

Add image api to flask server #16

Closed jbewing closed 3 years ago

jbewing commented 4 years ago

This PR adds three new endpoints for the Image API to the Flask server:

Note: the file format isn't necessarily restrictive to images at this point. Tbh, you could just use this as a BLOB storage like S3.

Testing

# I've run the following
poetry run flask run
curl -F "image=@/Users/jbewing/Desktop/a_golden_retriever.jpeg" 127.0.0.1:5000/api/images

And verified that http://127.0.0.1:5000/api/images returns

[{"href":"/api/images/1","title":"a_golden_retriever.jpeg"}]

and http://127.0.0.1:5000/api/images/1 returns

Screen Shot 2020-10-16 at 2 30 27 AM

Related Issues: https://github.com/brodigan-e/capstone-POV/issues/4 https://github.com/brodigan-e/capstone-POV/issues/5 cc @DarkAce65