By default, I want the user to be able to choose 1 of 30 ready-made avatars. If he wants – he can also upload his own.
-
Should the default avatars be uploaded to cloudflare images or should they be on the frontend, which will also be hosted in cloudflare?
-
Should I add an avatar column to each table in the database for models that can have an avatar? Or create an images table in which the id of all photos will be stored, including avatars with column collection = avatar?
-
Do you have any tips and advice on how to approach the topic of avatars and photos?
-
How do I ensure data integrity in my database and cloudflare images? I’m afraid that there will be a situation that some “abandoned photos” will remain in cloudflare images.
-
I mainly use direct upload url, so photos don’t go to my api, but directly to cloduflare. However, when the user adds media but has not added a post/review. The photos will stay in cloudflares. I solved it this way that each id is saved in the temporary table “cloduflare_temporary_images”. If the photo is used – it is removed from this table. If 24 hours pass, it performs a delete request to cloudflare. Is this a good solution or can it be approached better?
By default, I want the user to be able to choose 1 of 30 ready-made avatars. If he wants – he can also upload his own.