payloadcms/payload

Bulk Upload fails when media has localized fields

Closed this issue · 2 comments

Describe the Bug

If the media file has localized fields (e.g., alt with localized: true) and you try to upload multiple files using Bulk Upload, the upload fails. Although the frontend reports a successful upload, none of the media files are actually stored, and the server throws a 500 error.

media validation failed: alt: Cast to Embedded failed for value "test" (type string) at path "alt" because of "ObjectExpectedError"

Aufzeichnung.2025-09-18.121224.1.mp4

Link to the code that reproduces this issue

https://github.com/MarvinVrdoljak/payload-bug-report-3/tree/bulk-upload-localized-issue

Reproduction Steps

  1. Configure Payload with multiple locales
  2. In the Media collection schema, add a localized field such as: alt (localized: true)
  3. Start the admin panel and navigate to Media → Bulk Upload.
  4. Select multiple files
  5. Submit the bulk upload.

Which area(s) are affected? (Select all that apply)

area: core

Environment Info

Binaries:
  Node: 22.14.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.10.0
Relevant Packages:
  payload: 3.56.0
  next: 15.3.0
  @payloadcms/db-mongodb: 3.56.0
  @payloadcms/email-nodemailer: 3.56.0
  @payloadcms/graphql: 3.56.0
  @payloadcms/live-preview: 3.56.0
  @payloadcms/live-preview-react: 3.56.0
  @payloadcms/next/utilities: 3.56.0
  @payloadcms/payload-cloud: 3.56.0
  @payloadcms/plugin-form-builder: 3.56.0
  @payloadcms/plugin-nested-docs: 3.56.0
  @payloadcms/plugin-redirects: 3.56.0
  @payloadcms/plugin-search: 3.56.0
  @payloadcms/plugin-seo: 3.56.0
  @payloadcms/richtext-lexical: 3.56.0
  @payloadcms/translations: 3.56.0
  @payloadcms/ui/shared: 3.56.0
  react: 19.1.0
  react-dom: 19.1.0
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Tue Nov 5 00:21:55 UTC 2024
  Available memory (MB): 15672
  Available CPU cores: 22

🚀 This is included in version v3.57.0

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.