pruning of user fil...
 
Notifications
Clear all

pruning of user files?

4 Posts
2 Users
0 Reactions
990 Views
(@gecko64)
Posts: 82
Estimable Member
Topic starter
 

We're using Combu with a game that has a lot of user files, and quickly after release found those were really adding up on the server, using up a lot of disk space. We asked you about it, and you said:
____
If you mean files that you upload through UserFile class then you may want to delete files that are no more useful. Also consider that even if you upload new content to a previously saved UseFile, the old physic file is not deleted because it’s job of app logic (if you need to maintain clean, then delete and create new files instead of editing).
____

It was too late for that, since the game was already released, so we implemented an alternative suggestion you gave us:
____
The easiest way is to create a PHP script that cycle through the “upload” folder (and down in the tree, you can see an example in AddonModule::LoadAddons but you’ll need to convert it into a recursive function of course) and for each file check if exists a UserFile.

The SQL statement is:
SELECT * FROM CB_UserFile where Url = 'path'

Where path is relative from upload (excluded), for example: '2015/11/24/b2df5509702e540ab59aeb4dd955b9ed.png'
____
That's generally worked fine. But now we're about to set up Combu in a new game, and so I'm wondering the best way to handle this...or does Combu 3 have a method built into it?

 
Posted : 02/05/2017 4:26 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

It's not yet implemented but it could be useful to add an option in the server configuration of Combu 3 to delete old file after successful saving the new content. Since I'm going to release Combu 3 officially later this week I will add this feature before release.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 02/05/2017 6:06 pm
(@gecko64)
Posts: 82
Estimable Member
Topic starter
 

That would be terrific, thanks much!

 
Posted : 02/05/2017 6:16 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

Yup, I implemented it right now and is already available in Beta 12, visit your Purchase History.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 02/05/2017 6:29 pm
Share: