Attachments Tree
By Paul
3/5 based on 1 vote. The median rating is 3.
By Paul
When you have thousands of files being uploaded, it can become impossible to find anything by FTP or it could exceed the number of files your FTP client is capable of displaying.
The solution to this matter is to have the uploaded files organized into subdirectories, based on your category names. Do note that this will come at a cost: certain actions (see later in this article) will require regeneration, and you are overall more likely to encounter bugs in this complex method of handling attachments.
In your switches area, turn 'attachments directory as category tree' on to enable this. You will then have to go to 'regenerate counters' and regerate all articles so that the files will be moved.
PHP must have permission to create directories and move files. If you get errors, switch this off... under some hosting setups it will not work.
Important note:
When using the attachments tree, whenever you change the parent of a category you will need to regenerate articles in order to get the attachments moved to the new location.
The following applies only to WSN Gallery:
FTP Import and Tar Upload
When doing an FTP import with the attachments tree on, upload all images to your base attachments directory. Do not upload them to subdirectories. Then run the FTP import in your admin panel. Then, you need to regenerate articles so that the files will be moved by the script into the directories where they belong.
For tar file imports, you will also need to generate articles after importing.
The solution to this matter is to have the uploaded files organized into subdirectories, based on your category names. Do note that this will come at a cost: certain actions (see later in this article) will require regeneration, and you are overall more likely to encounter bugs in this complex method of handling attachments.
In your switches area, turn 'attachments directory as category tree' on to enable this. You will then have to go to 'regenerate counters' and regerate all articles so that the files will be moved.
PHP must have permission to create directories and move files. If you get errors, switch this off... under some hosting setups it will not work.
Important note:
When using the attachments tree, whenever you change the parent of a category you will need to regenerate articles in order to get the attachments moved to the new location.
The following applies only to WSN Gallery:
FTP Import and Tar Upload
When doing an FTP import with the attachments tree on, upload all images to your base attachments directory. Do not upload them to subdirectories. Then run the FTP import in your admin panel. Then, you need to regenerate articles so that the files will be moved by the script into the directories where they belong.
For tar file imports, you will also need to generate articles after importing.
Rating:
3/5 based on 1 vote. The median rating is 3.
Submitted: 08/05/04 (Edited 08/26/04)
Description: Details on turning your attachments directory into a category tree of files.
Views:
1240 views. Averaging 1 per day.
In the most recent 30 day period, there've been 6 views.

Print
E-Mail