Issue Bug Resolved

#108567Renaming file on S3: Exception "File has been deleted"

Christian Weiske 12/23/25, 08:51 updated 09/07/26, 09:40

Description

We’re using TYPO3 v13.4.22 with the aus-driver-amazon-s3 FAL driver on a MinIO object storage.
When renaming a file, the file gets renamed but then a RuntimeException “File has been deleted.” is thrown when the preview image shall be regenerated.

  • This only happens with the S3 driver, not with the local file system driver
  • This only happens in the File list “Tiles” view, not in the list view.

I still think it is a bug in TYPO3.

What happens

  1. File gets renamed via AJAX call
  2. File list in “Tiles” view gets reloaded and wants to render an scaled preview image
  3. Extbase ImageService::applyProcessingInstructions() is called and calls $image->process()
  4. An existing ProcessedFile is found and asked if re-processing is necessary: ProcessedFile::needsReprocessing(). The local storage driver says no, the S3 driver says yes. (Note: The task checksum changes because it contains the file modification time, which changes on S3 – because it does not have a “move file” API endpoint: It re-uploads the file with the new name and then deletes the old one)
  5. ProcessedFile::needsReprocessing() deletes itself from storage and marks itself as deleted with setDeleted()
  6. The processing task re-generates the thumbnail and stores it.
  7. imageService calls setCompatibilityValues, which calls ImageResource::createFromProcessedFile that notices that the file object is marked as deleted, and throws the “File has been deleted” exception.

What should happen

When the processing task re-creates the thumbnail, the ProcessedFile object should be marked as “not deleted”.
This could happen in FileProcessingService::processFile() or in the task processor, e.g. DeferredBackendImageProcessor.

Alternatively, a new ProcessedFile instance needs to be used.

Problems

There is no API to reset the “deleted” property on file objects from external classes.

Links

Reviews 5