Fix missing csrf field in file manager delete form
This commit is contained in:
parent
230f7963a0
commit
311214ad7f
@ -97,7 +97,7 @@ export default class FileController extends Controller {
|
||||
|
||||
switch (file.storage_type) {
|
||||
case 'local':
|
||||
await this.deleteFile(file);
|
||||
await FileController.deleteFile(file);
|
||||
break;
|
||||
default:
|
||||
throw new ServerError(`This file cannot be deleted. Deletion protocol for ${file.storage_type} storage type not implemented.`);
|
||||
|
@ -43,6 +43,7 @@
|
||||
Pending deletion
|
||||
{% else %}
|
||||
<form action="{{ route('delete-file-frontend', file.slug) }}" method="post">
|
||||
{{ macros.csrf(getCSRFToken) }}
|
||||
<button class="button danger"><i data-feather="trash"></i> Delete</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user