How to calculate the uploaded files size for each project separately?
Added by Azhagu Selvan SP about 13 years ago
We are in plan of starting a low-cost project hosting for our university students based on redmine. We need to calculate the disk space occupied by each project. So for that we need to calculate the size of the files that are uploaded in each project. I saw that all files are uploaded into the files/ folder. The table 'attachments' which has the list of uploaded files, has mapping only to the author and the container it has been attached to. From this how can I find the way to map the files to their corresponding projects?
How are they mapped in actually??
Also, any general help on calculating project size, from the guys who are already into this business is highly appreciated :)
RE: How to calculate the uploaded files size for each project separately? - Added by F Delehal about 13 years ago
Looking at the attachments table, container_type should tell you where you'll need to look next. If it's "Project", you can look at the projects table; if it's "version" you can see which project that version's associated with in the versions table; if it's "WikiPage" you can see which project that page is associated with in the wiki_pages table.
There's probably somewhere else you can add attachments, too -- I just noticed there's an option when posting on the forums! -- but I've only been using Redmine for a few months.