Skip to content

Options for serving movie posters #166

@audiodude

Description

@audiodude

Assuming we have a source for movie posters, there are a few ways we could handle serving them:

  1. 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.png or something.
  2. We could also store the movie posters on disk on the server, in like an img directory next to the out directory. Flask could serve these in response to a url like http://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.
  3. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions