We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

storage of picture is so BADLY designed - Photo | Forum

climaxx
climaxx Sep 3 '13
i am switching from buddypress to oxwall

on the frontend oxwall is better finished as buddypress
but on the backend some things simply FAIL


for photo uploads
all photos are in the same directory named depending on order upload


this is SO BAD DESIGN

why not to store the picture in a directory like USER/album

this is so bad for backup and everything


also if we receive a request from a user to delete all the data frmo them
how could i satisfy the user if everything is mixed up and that i cannot trace from who is the file ....

the frontend work perfect
but this kind of backend is not as serious as everything around is


maybe you shall have a quick look on that
I think this is nothing complicated for your team to arrange better the uploads
or give me a good reason to put all the files mixed in a unique directory
Daniel
Daniel Nov 30 '13
As for the storage, it depends. There is no general rule that folders or a flat structure are better for backup solutions. The distinction is a technicality on the file system level, and if your backup solution has problems with it, it might not be a very good backup software.

If you need to delete all photos of a user, you need to check the MySQL database. In table ow_photo_album, find all entries with the userId of the user you're looking for. Take the id of all the albums created by this user, and then in table ow_photo find all photos that have any of them as albumId. These are all the photos by that user, and the id numbers correspond to the image filenames.

Not optimal if you are doing it by hand, but it wouldn't be too hard to create a quick script to do it.
You do not have permission to reply this topic