Sidebar

startup_tutorial_and_checklist:feature_configuration:file_upload:managing_user_images_size

Managing the Size of the Directory Images Are Uploaded To

The software uploads user images into a directory on the server that you set within the following admin tool setting:

LISTING SETUP > FILE UPLOAD & DISPLAY SETTINGS > Server Path to Root of Photos Directory

You can change that configuration if you like to upload to a different directory. You would first create the new directory name through ftp and then give it the "777" rights that you did for the default directory at installation. We would suggest something named like your current one or possibly another directory within the default /user_images directory. Once you've created that directory and given it the correct right update the admin tool setting above and the following:

LISTING SETUP > FILE UPLOAD & DISPLAY SETTINGS > Photo Directory URL

Once that is done your software would be writing newly uploaded images to the new upload directory. Do not worry about this change for current images in the system as the upload path and directory url are saved with that image within the database. Do not change or delete the current upload directory name or any of the files uploaded into it. They are still referenced within the system correctly. That allows the software to serve up any of them as well as delete any uploaded file when archiving is done.

If you decide to implement the suggestions made in this page make a plan for the directory names used beforehand. This should make it easy to switch when you decide to. Don't forget that images are removed at archiving so you may find that you can go back to an already used directory once some images have been removed. We actually suggest that. We also suggest you create these other upload directories inside the default /user_images directory. You could use subdirectory names like 1-100 or a-z.

Why You Would Change that File Upload Directory

The more successful your site is the fuller that directory can become. The fuller the directory becomes the slower the server can take to search that directory and serve up the image when asked to. Another alarming issue is that some hosts have a max number of files within a directory. What that max file limit is your host may not be forthcoming about posting. If your site starts to take off check with your host directly if this information is not in their documentation.

<tip c n>It is best to know this "max file limit in a single directory" before you hit as how a host reacts to that limit being hit varies quite a bit by our experience. Some cases they send you an email warning you of the limit and let you address the issue in time. We've seen other hosts keep that file count to a fixed amount yet they still allow you to add files. That means that while the new files are kept the oldest files are removed one by one as your clients upload images one by one. The worst case is the latter situation AND that you get no notification of it happening.</tip>

You can easily check the number of files in your user_images directory through the use of ftp. Once you ftp into your site you can open the user_images directory (or the one you have set to upload into) and your ftp software will give you a count of the files in that directory. You can also check the same through your site control panels file manager feature also.

<tip c n>Also note that images attached to listings are kept on the server until that listing is archived. By default a listing is archived 30 days after expiration. That "archive date after expiration" is a configuration you can change in the admin tool though. So if you see a file count a lot larger than you think it be the reason is that expired listing images are kept also for a time</tip>

Even if you find the hosts "file per directory" limit and you're way under it you may still occasionally shift the directory your software uploads to from time to time to make sure it's never a problem and to keep download speed up on your site for user uploaded images.

At what point should you look to start looking to change or rotate the directories you upload to? That's not a question we can answer directly. It depends on your host "files per directory" limit. Or whether you want to keep download speeds absolutely optimal at all times. You may decide to make this change with every 1000 or 10,000 listings added to your system.

startup_tutorial_and_checklist/feature_configuration/file_upload/managing_user_images_size.txt · Last modified: 2014/09/25 16:55 (external edit)