mirror of
https://github.com/directus/directus.git
synced 2026-01-31 22:48:12 -05:00
Merge pull request #3639 from mehmetuken/delete-files
Files delete permission check first and after delete files.
This commit is contained in:
@@ -104,6 +104,8 @@ export class FilesService extends ItemsService {
|
||||
throw new ForbiddenException();
|
||||
}
|
||||
|
||||
await super.delete(keys);
|
||||
|
||||
files = toArray(files);
|
||||
|
||||
for (const file of files) {
|
||||
@@ -115,8 +117,6 @@ export class FilesService extends ItemsService {
|
||||
}
|
||||
}
|
||||
|
||||
await super.delete(keys);
|
||||
|
||||
if (cache && env.CACHE_AUTO_PURGE) {
|
||||
await cache.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user