Closed BenoitSafari closed 1 year ago
This isn't tested yet, but the general idea is here.
This task as changed a lot since we write the issue, a first look wouldn't be a bad idea.
@Julien-Goletto I've reworked the front to match the new file API, there's probably some stuff to rework. I've run into an issue that I'm too tired to fix, on the proposition page (When TMDB API is called). I'm counting on you to save the day, as I'm aware of your ninja's skills :ninja:
@thomas-beylemans I know this is a very big amount of code to read, but I want you to review this as well. :family_woman_boy_boy:
The biggest change is that you now ask for static files from the public API using the following route: public/:docType/:entityId
where docType can be either "avatar" | "poster"
where entityId is the user | movie id
As we now store files in our server, data backups cannot work like they use to. There is new scripts in the package.json that will handle dev environment, production backups strategy must be updated too. You will find the new setup tutorial in the project wiki.
Project storage has also been updated, you will now find at root an .xz
file named "_devDatabase" prefixed with a date. Extract it's content to your project root folder and execute the db scripts as explained in the project wiki. You can extract .xz
files using tar.
Files are stored in a document table, linked to corresponding entities with a document_group_id. There's not much to say about that.
I've prepared a migration API, that we will use this to update the deployed API. From now on, I'll update the database using this API.
Good night
@Julien-Goletto I will add an endpoint that serves images using GUID, until you find a better solution to use shared folders.