[BUG] Grid export: allow specifying the download file name - #2023
Open
Jonathon-Meney-Torq wants to merge 2 commits into
Open
[BUG] Grid export: allow specifying the download file name#2023Jonathon-Meney-Torq wants to merge 2 commits into
Jonathon-Meney-Torq wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds configurable, sanitized filenames for CSV/XLSX grid export downloads while preserving existing fallback names.
Changes:
- Adds the
fileNameexport configuration. - Stores sanitized filenames in job environment data.
- Resolves custom filenames before ZIP and controller fallbacks.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/Export/Service/ExecutionEngine/ExportService.php |
Sanitizes and stores requested filenames. |
src/Export/Service/DownloadServiceInterface.php |
Defines the export filename environment key. |
src/Export/Service/DownloadService.php |
Adds export filename resolution and fallbacks. |
src/Export/Attribute/Request/ExportFolderDataRequestBody.php |
Documents folder-export filenames. |
src/Export/Attribute/Request/ExportDataRequestBody.php |
Documents element-export filenames. |
src/ExecutionEngine/Util/StepConfig.php |
Adds the fileName configuration key. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
Allows grid CSV/XLSX exports to specify the download file name.
StepConfig::SETTINGS_FILE_NAME(fileName) config key, documented in the OpenAPI request schemas for element and folder exports.ExportServicereadsconfig.fileName, sanitizes it (basename, restricted character set), and stores it in the job's environment data under a newDownloadServiceInterface::EXPORT_DOWNLOAD_FILENAMEkey — the same mechanism ZIP downloads already use.DownloadService::resolveDownloadName()now resolves the export file name first, then the ZIP file name, and falls back to the name passed by the controller (export.csv/export.xlsx), so existing behavior is unchanged when no file name is provided.Why
Grid export downloads were always named
export.csv/export.xlsx, making it hard to tell which grid an export came from. With this change the Studio UI sends a grid name + timestamp file name (see the companion studio-ui-bundle PR), e.g.Product_2026-09-01_14-32-10.csv.Closes pimcore/platform-version#437