Questions on: upload time / upload warning / batch processing

I have created a complex customer portal where I offer my customers files of all kinds. Now I am fine-tuning it and would like to optimise a few functions. These mainly concern data handling. Here are my questions:

  1. Is it possible, for example, to use a hook when uploading files in the panel to adopt the local modification date of the file instead of the upload time?
  2. How can I override the warning/block on re-uploading a file that already exists with the same name if I want to replace it anyway? I often have to overwrite existing files, and this blockage is preventing me from completing my workflow.
  3. How can I delete multiple files at the same time in the panel?
  1. Have you check if the local modification date is still present in file.create:after | Kirby CMS? I am not sure if this gets passed to an uploaded file from the browser to the server.
  2. If you have’t yet, please upvote: Replace files on upload · Kirby Feedback - I fear there is no way via a plugin as this is hardcoded in the FileRules class.
  3. Existing feature request: Bulk edit or delete pages/files · Kirby Feedback
  1. In my file blueprint, there is a date field:
published:
  type: date
  time: true
  default: now

I would like to overwrite this with the hook.
However, the upload date will continue to be adopted.

'file.create:after' => function ($file) {
    $filePath = $file->root();

    if (!file_exists($filePath)) {
        return;
    }

    $modifiedTime = filemtime($filePath);

    if ($modifiedTime === false) {
        return;
    }

    try {
        kirby()->impersonate('kirby');

        $file->update([
            'published' => date('Y-m-d H:i:s', $modifiedTime)
        ]);
    } catch (Exception $e) {
    }
},

  1. + 3. I voted :+1: