addExceptionItem( $storage, $storage->getUploadedLocalFilePath($uploadedFile), $storage->getUploadedTargetFileName($uploadedFile, $targetFileName), ); } /** * Registers an instruction to skip validation in `ResourceConsistencyService` * for commands (such as rename or replace) for existing files. */ private function skipResourceConsistencyCheckForCommands( ResourceStorage $storage, string|FileInterface $resource, ?string $targetFileName = null, ): void { $targetFileName ??= PathUtility::basename( $resource instanceof FileInterface ? $resource->getName() : $resource ); GeneralUtility::makeInstance(ResourceConsistencyService::class)->addExceptionItem( $storage, $resource, $targetFileName ); } }