Edwinexd / dsv-pvt

Lace Up & Lead The Way - A pre-race training app and social platform for runners.
GNU General Public License v3.0
0 stars 0 forks source link

Image uploading/downloading service #56

Closed alfredberggren closed 4 months ago

alfredberggren commented 4 months ago

Ongoing PR open to continuous review

alfredberggren commented 4 months ago

@Edwinexd a few thoughts that are popping up as I'm working on this that i want your input on:

I was thinking the way we keep track of which user has which picture would be through a db-table in backend, which stores the user id along with the name of the picture. So when we run GET on that users id on "/images" backend will then request the images service with that pic name. Is this structure sufficient or does there need to be some validations in the image service itself?

Authentication would then be done thru our pre-existing session service, so that only a certain user can upload pics to their own account?

Regarding caching; is that something that will be happening client-side? i.e. the first time our image service is contacted, we perform the operation against S3, but then the image is stored locally on the users phone for the duration of the session, and S3 is not contacted again until the cache is cleared. Am i understanding it correctly? Or should i write a server-side cache between backend and image-service caching images in the backend container?

EDIT: resolved in vc :+1:

alfredberggren commented 4 months ago

Going to add endpoint for uploading and deleting group and activity images soon. (edit: and challenges, achievements etc.)

Other than that is there something you think is missing @Edwinexd ?

Edwinexd commented 4 months ago

Going to add endpoint for uploading and deleting group and activity images soon. (edit: and challenges, achievements etc.)

Other than that is there something you think is missing @Edwinexd ?

I think thats it, gj!