-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Assuming we have a source for movie posters, there are a few ways we could handle serving them:
- The probably "right" way would be to store them in S3, which we load them into during some load step. The database would contain the object ID of the S3 object (image) and we would generate a url like
http://s3.us-west-1.amazonaws.com/mediabridge/1234-5678.pngor something. - We could also store the movie posters on disk on the server, in like an
imgdirectory next to theoutdirectory. Flask could serve these in response to a url likehttp://localhost:3000/api/movies/123/img. This is inefficient for Flask and should generally be avoided, but is fine for development. We'd want to set up like nginx for serving static images in production. - Same as above, but store the binary image data in the database as a
BLOB. Then Flask responds to the same API img URL and reads the data from the database before sending it.
We could also "hotlink" the movie posters from another site like the movie database, but this is considered very rude and also means that our site could break if they ever change their URL format.
Metadata
Metadata
Assignees
Labels
No labels