Manual:EraseArchivedFile.php
Appearance
미디어위키 버전: | ≥ 1.22 |
미디어위키 파일: eraseArchivedFile.php | |
---|---|
위치: | maintenance/ |
소스 코드: | master • 1.42.3 • 1.41.4 • 1.39.10 |
클래스: | EraseArchivedFile |
설명
eraseArchivedFile.php 파일은 --filekey
에 의해 제공되는 아카이브 파일을 파일시스템에서 삭제하는 유지보수 스크립트입니다.
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.
Information about deleted files is stored in the filearchive table.
Options/Arguments
옵션/매개 변수 | 설명 | Required? |
---|---|---|
--filekey | File storage key (with extension) for a specific version to be deleted or "*" for all versions (in that case, --filename is required). The file storage key is an entry from the fa_storage_key column of the filearchive table.
|
Required |
--filename | File name (corresponds to the value of fa_name in the filearchive table).
|
Optional |
--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
Terminal
$ 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
Terminal
$ 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'
같이 보기
- Manual:filearchive table
- 메뉴얼:DeleteArchivedFiles.php - Script to permanently remove all deleted files.
- Manual:deleteArchivedRevisions.php