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

How are photo filenames related to user? | Forum

Topic location: Forum home » Support » General Questions
Joaquin
Joaquin Mar 7 '16

Hi

I've been looking about this but haven't found anything so far.

I have a number of user photos and avatars that must be deleted but I don't only want to delete the photo, but also the whole profile.

The filenames of the photos are like photo_70992.jpg but I don't know what profile that photo belongs to.


Do anyone know how this works?


Thank you


Joaquin


The Forum post is edited by Joaquin Mar 7 '16
ross Team
ross Mar 8 '16
Joaquin, it will be really hard that way to discover which photo belongs to certain profiles. 

it will be easier for you just to delete profile. All content created by this user will be deleted as well. 

The Forum post is edited by ross Mar 8 '16
Joaquin
Joaquin Mar 9 '16

Hi Ross,


That is exactly the problem. I don't know what profile they belong to. I found the photos by browsing the photo folder in the files explorer.


ross Team
ross Mar 9 '16

for example


a photo named like this: photo_53_565d7f1843847.jpg

you need to go phpmyadmin->ow_photo table 

and find the photo ID by this hash 565d7f1843847


it will be for example 91


then go to your site and enter this domain: www.yoursite.com/photo/view/91

this way you'll be able to know who uploaded the photo

The Forum post is edited by ross Mar 9 '16
WOO
WOO Mar 9 '16
Why not design to classify photos to a folder named by username? That would be very easy to manage.


Or the file name is related to a user, such as user id. If we donot want to get too many folders.


What do you think?




The Forum post is edited by WOO Mar 9 '16
Joaquin
Joaquin Mar 9 '16

Hi Ross,


No need to go to the database.


Just by writing the link you sent, and the number in the file name at the end the photo will show, and the profile can be opened if logged in as admin, and then deleted.


Thank you for helping






ross Team
ross Mar 9 '16
Yes, actually that works too)).