getgrav/grav · error · RuntimeException

PLUGIN_ADMIN.FAILED_TO_MOVE_UPLOADED_FILE

Error message

PLUGIN_ADMIN.FAILED_TO_MOVE_UPLOADED_FILE

What it means

Error "PLUGIN_ADMIN.FAILED_TO_MOVE_UPLOADED_FILE" thrown in getgrav/grav.

Source

Thrown at system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:322

                    $this->doSaveMetadata(['upload' => $metadata], $name, $path);
                }
            } else {
                // Not a FormFlashFile.
                $this->doMoveUploadedFile($uploadedFile, $filename, $path);
            }

            // Post-processing: Special content sanitization for SVG.
            $mime = Utils::getMimeByFilename($filename);
            if (Utils::contains($mime, 'svg', false)) {
                $this->doSanitizeSvg($filename, $path);
            }

            // Add the new file into the media.
            // TODO: This overrides existing media sizes if used with multiple retina image sizes.
            $this->doAddUploadedMedium($name, $filename, $path);

        } catch (Exception $e) {
            throw new RuntimeException($this->translate('PLUGIN_ADMIN.FAILED_TO_MOVE_UPLOADED_FILE') . $e->getMessage(), 400);
        } finally {
            // Finally clear media cache.
            $locator->clearCache();
            $this->clearCache();
        }
    }

    /**
     * Delete real file from the media collection.
     *
     * @param string $filename
     * @param array|null $settings
     * @return void
     * @throws RuntimeException
     */
    public function deleteFile(string $filename, ?array $settings = null): void
    {
        // Add the defaults to the settings.

View on GitHub (pinned to 6040efed04)

When it happens

Trigger: Thrown at system/src/Grav/Common/Media/Traits/MediaUploadTrait.php:322 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of getgrav/grav@6040efed04 (2026-08-17). Data as JSON: /api/errors/a40ca1b3444e55ba. Report an issue: GitHub.