Skip to content

Add components for extra media on different pages #17

@samjjacko

Description

@samjjacko

This feature depends on MVP being completed, so don't start this yet!

The site would feel a lot more polished if we added collections of media to several different pages. Specifically:

  • Individual game pages should feature a carousel of gameplay screenshots/videos, a bit like how it's done on steam
  • Individual member pages should feature either the same carousel or some other structure for displaying a gallery of images

To do this, we should have a media table and some additional bridging tables to games and members, like:

Media Model

  • varchar media_path (pk and fk)
  • varchar alt_text (optionally null)
  • enum filetype # 0 for raster images (png, jpeg, etc), 1 for svgs/vectors, 2 for videos

GameMedia Model

  • varchar media_path (pk and fk)
  • uuid game_id (fk)

MemberMedia Model

  • varchar media_path (pk and fk)
  • uuid member_id (fk)

and additional bridging tables if we decide to add more media to other pages.

While we trust the committee of the gamedev club at uwa, it's probably a good idea to do some checks on the media first, like:

  • Basic serialiser validation on the path supplied (does the path exist? will this path escape from the media folder and into somewhere it shouldn't be?)
  • python-magic to spot mismatches between the magic numbers inside the actual binary and the magic numbers expected for this file extension, and to infer the appropriate filetype enum.
    If these cases pass, we can insert the path and inferred filetype enum into into the database, and store the file on the machine's filesystem

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions