|MediaWiki file: eraseArchivedFile.php|
|Source code:||master • 1.37.2 • 1.36.4 • 1.35.6|
eraseArchivedFile.php file is a maintenance script to delete the archived file provided by
--filekey from the filesystem.
When the script is run with
--filekey or with
--filename, it will purge the thumbnails of the according image - even, if
--delete has not been specified.
That way you can use the script to force a re-rendering of the thumbnails without having to re-upload the image.
Informatii despre fisierele sterse sunt stocate in tabelul filearchive.
|--filekey||File storage key (with extension) for a specific version to be deleted or "*" for all versions (in that case,
|--filename||File name (corresponds to the value of
|--delete||Perform the deletion. Will delete the archived file and possible thumbnails, but will not delete its entry in the filearchive table (nor will it delete log messages of the upload/deletion of the now-deleted file).||Optional|
php maintenance/eraseArchivedFile.php --filekey fa_storage_key [ --filename| --delete ]
Dry run to check deletion
$ php maintenance/eraseArchivedFile.php --filekey o50kk2gmida2gmaxbp19qzdhhfosovz.jpg Use --delete to actually confirm this script Purging all thumbnails for file '1631330937964.jpeg'... done. Would delete version 'o50kk2gmida2gmaxbp19qzdhhfosovz.jpg' (20211026113341) of file '1631330937964.jpeg'
Making deletion action
$ php maintenance/eraseArchivedFile.php --filekey o50kk2gmida2gmaxbp19qzdhhfosovz.jpg --delete Purging all thumbnails for file '1631330937964.jpeg'... done. Deleted version 'o50kk2gmida2gmaxbp19qzdhhfosovz.jpg' (20211026113341) of file '1631330937964.jpeg'