[v4 beta] Filename regression: uploads get an unconfigurable `-original` suffix, even without transformations or versioning
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend, full-stack
Research direction
Start by reading the upload file-versioning implementation in pull request #18548 and trace how it chooses filenames when a collection has versions: false and no file transformers. Reproduce with the documents collection configuration and inspect the resulting filename and file URL. Done means the uploaded filename is preserved by default in this case, or a supported configuration option is provided while file tracking, rollback, and cleanup continue to work.
Written by the indexing model from the issue text.
Description
Below was generated by AI, but manually proof-read and vetted
Summary
Payload v4 appends -original to uploaded filenames even when:
- No file transformers are configured.
- Versioning is disabled for the collection.
- The uploaded file is intended to be served directly to website users.
This changes a user-facing filename without an apparent need or a supported configuration option to preserve it.
A client uploading privacy-policy.pdf should not have that file renamed to privacy-policy-original.pdf by default.
Versions
| Package | Previous | Current |
|---|---|---|
payload |
3.90.1 |
4.0.0-beta.1 |
Background
The upload file-versioning implementation (#18548) introduced retained originals and the -original filename suffix.
Keeping an original source is useful when Payload creates other representations or retains file history.
However, the suffix also becomes the normal filename when neither feature is in use. In that case, there is no processed version to distinguish from an “original”.
Reproduction
-
Configure an upload collection with versioning disabled:
{ slug: 'documents', versions: false, upload: { mimeTypes: ['application/pdf'], }, fields: [], } -
Do not register any file transformers.
-
Upload a file named
privacy-policy.pdf. -
Inspect the resulting document’s
filenameand generated file URL.
Actual behaviour
Uploaded: privacy-policy.pdf
Result: privacy-policy-original.pdf
The renamed file is the one normally linked from the website—not merely an internal backup or source copy.
Expected behaviour
Uploaded: privacy-policy.pdf
Result: privacy-policy.pdf
Normal filename sanitisation and collision handling should still apply.
Why this matters
This is a visible change from v3, not just an internal storage detail.
For clients managing documents:
- The published filename no longer matches the file they uploaded.
- “Original” can suggest that another, processed or final version exists.
- Internal file-management terminology appears in public links and filenames.
For example, a privacy policy, application form or annual report usually needs no transformation. Adding -original makes these filenames less clear without providing a benefit to the client or website user.
Configuration gap
Disabling versioning and leaving transformers unconfigured does not prevent the suffix.
We could not find a supported option to disable or customise it. Preserving an ordinary public filename should not require a post-upload rename or custom file-management code.
Expected behaviour / requested change
Preserve the uploaded filename by default when transformations and versioning are not in use.
Where Payload needs a separate retained source, its internal naming should not unnecessarily change the filename presented to website users.
If -original must remain the default, provide a supported option to disable or customise it while keeping file tracking, rollback and cleanup correct.
- Dominant language
- TypeScript
- Stars
- 45.6k
- Forks
- 4.4k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 280
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from payloadcms/payload
-
Form Builder Plugin: an internal link in an email message stops all of the form's emailsPossibly taken @DoctorGuidance claimed this 1 day ago. OpenBug plugin: form-builder status: needs-triage v3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
payloadcms/payload#19253 ·
Maintainers usually reply within 1 day
-
Required Lexical field accepts two empty paragraphsPossibly taken @lazerg claimed this 3 days ago. OpenBug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#19222 ·
Maintainers usually reply within 1 day
-
area: ui Bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
payloadcms/payload#19198 ·
Maintainers usually reply within 1 day
-
Grid view: show the file placeholder when a thumbnail image fails to loadPossibly taken @lazerg claimed this 4 days ago. OpenBug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
payloadcms/payload#19181 ·
Maintainers usually reply within 1 day
-
WhereBuilder throws "Cannot read properties of undefined (reading 'value')" when the list URL filters on a field that is not filterablePossibly taken A pull request linked to this issue is open or already merged. OpenBug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
payloadcms/payload#19002 · 1 comment ·
Maintainers usually reply within 1 day
All issues in payloadcms/payload
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
JuliusBrussee/caveman#1449 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
linagora/twake-calendar-frontend#1924 ·
Maintainers usually reply within 1 day
-
Add: Class TV ModaOpencheck:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
libnativeapi/nativeapi#21 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
GiganticMinecraft/seichi-playguide#183 ·
Maintainers usually reply within 1 day