-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finishes out the 'october:util purge uploads' placeholder function #4029
Conversation
@w20k ready for testing |
@bennothommo is this something you'd be interested in testing / reviewing? |
|
||
$this->info('Purged: '. basename($file)); | ||
$totalCount++; | ||
@unlink($file); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@austinderrick Could you check if the file is writable and can be deleted before saying it is purged and trying to unlink it, and indicate to the user if it could not be deleted? It is currently saying it has purged files that may not have actually been removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, if you don't mind, could you also make the same change to the utilPurgeThumbs()
method? :)
@austinderrick @LukeTowers Works well, although I did notice that it does not delete folders that have been emptied, so it can potentially leave a lot of orphaned directories. |
@austinderrick @bennothommo could we use |
Works great - confirmed ✅ |
@w20k We still need @bennothommo and @austinderrick to respond to my last question |
@LukeTowers just had a few hours of spare time to run through all my todos or half ;) |
@LukeTowers I've assigned the PR to myself to have a look at the method you suggested, as it appears @austinderrick has abandoned it. Hopefully will give it another look in the next couple of days. |
Credit to @austinderrick for the initial implementation (#4029)
This PR is now being finalised in #4518. |
Only works for uploads stored on the local disk right now, support for remote disks may be added in the future at some point. Replaces #4518 & #4029. Credit to @LukeTowers, @bennothommo, & @austinderrick.
Finishes out the october:util purge uploads placeholder function.