Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload pictures of played games #261

Open
FServais opened this issue Apr 20, 2020 · 3 comments
Open

Upload pictures of played games #261

FServais opened this issue Apr 20, 2020 · 3 comments
Assignees
Labels
component/backend Backend related issues. (Should be empty) component/ui UI related issues sev/new_feature New feature or request

Comments

@FServais
Copy link
Collaborator

When encoding the scores/result of a game, we could add the possibility to upload a picture.

@FServais FServais added sev/new_feature New feature or request component/ui UI related issues component/backend Backend related issues. (Should be empty) labels Apr 20, 2020
@FServais FServais added this to the Awaiting triage milestone Apr 20, 2020
@FServais FServais self-assigned this Apr 20, 2020
@FServais
Copy link
Collaborator Author

Linking #210 for backend design

@FServais
Copy link
Collaborator Author

Here's how I think we could design this:
Upload Image Game (1)

In this case:

  • New API: PUT /game/<id>/img/upload to upload an image in game with id id
  • PUT /game/<id>/img/upload is waiting on PUT /game to finish and to use the game ID

Questions:

  • What do we need to store in DB?
    • Only S3 URL in game table?
    • Create a new table to reference all uploads?
  • Do we need other APIs?
  • How to handle picture remove?
  • What did I forget? :)

@waliens
Copy link
Collaborator

waliens commented Apr 24, 2020

  • Having a table centralizing all uploaded files is a good idea.
  • We would need new API endpoints for any image upload i guess (profile pic? event picture?)
  • For removing, we can simply unlink files from related objects/tables in the database (game, event..) and have a cron job cleaning unused files once in a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/backend Backend related issues. (Should be empty) component/ui UI related issues sev/new_feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants