How do you maintain a big image directory? How do you maintain a big image directory?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

How do you maintain a big image directory?

Started by amirw2k, December 03, 2005, 09:44:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

amirw2k

Hi all,
Up until now, I've uploaded files via FTP so I created sub-directories for images. Now I'm going to open the gallery for visitors and I'm afraid of what happens when a lot of images get to the same directory.

One image = 4 files (thumb,normal,full,backup).
5000 images = 20,000 files.

It will take some time to browse this directory using FTP and I'm afraid it will be very slow.

Did any of you run into a problem when you had so many files in the same directory?

Joachim Müller

FTP-uploads go to custom folders you specify within the albums folder. User uploads will go into the userpics sub-folder and therefor not clutter the folders that are visible during batch-add. Having 20k pics is no problem at all for coppermine.
Stop posting on the "general discussion" board if you expect answers: it says "no support". Post on the support board that deals with your version of coppermine instead. Moving this thread to the support board.

amirw2k

Hi GauGau,
Sorry for confusing the forums  :-\\

Actually my question didn't relate directly to coppermine,  but to handling a very big number of files in the same directory. I'm not concerned about FTP uploads or their seperate sub-directories because I can control that. Now that I'm allowing users to upload (using the web interface), then all the new pictures will go to the same directory which might cause a one-directory-overload and that bothered me. My main purpose is to stop batch uploading files via FTP and let the users do all the uploads.
Thanks for your response.

Paver

User uploads go into the userpics folder under a separate folder for each user (numbered from 10000 on up).  So unless one user goes haywire, you should be fine.  That being said, I don't know when or even if a folder would go nuts at a certain number of files in it.

amirw2k

Very strange. This is how it used to work when in my previous gallery ver 1.1d (saving to different sub-directories). As I recall, this wasn't working properly in "Safe Mode" and unfortunately my server set it on.

On the current version, coppermine saves the files to the userpics directory (no sub-directory). Maybe it's related to the fact that I'm using the a bridged gallery...

Nibbler

Coppermine will only create the subdirectories if silly_safe_mode is disabled. It's not related to bridging.

amirw2k

Thanks for the info Nibbler. I must say that this feature makes it very flexible. I know that Menalto's Gallery doesn't support this at all which makes coppermine the best gallery for everyone. By the way, I was looking for alternatives until I discovered the bridge thing which practically allows you to make coppermine work with almost any CMS  :)

Returning to the subject, what side-effects will appear if I change the sub-directory for user's pictures? I know that the path is saved within the database, so if I change it while being is Safe Mode, I can't see how it makes anything work wrong.

Joachim Müller

what path are you refering to? The "albums" or "userpics" path in coppermine's config? If you decide to change them, you'll have to go through the database and change the relative paths for each field as well - not recommended (after all, it's just a name, so why bother?). Changing those paths to point to folders outside the coppermine root folder is not recommended at all unless you really, really know what you're doing.

amirw2k

Hi GauGau,
I meant changing the userpics name in coppermine's config while keeping the old files inside so the database will still have reference to them.

1. Create a new sub-directory under albums called userpics2.
2. Change userpics to userpics2 in the config.

The old pictures will stay under userpics sub-directory so everything will work properly. After all, the path is saved in the database and as I see it the config affects only new files uploaded, right?

Joachim Müller

haven't tested, but this should work - yes. However, some functionality will break, like the admin tools. Not a recommended solution imo.