KML uploads to Documents fail since Payload 3.90.2: empty browser MIME type is rejected for client uploads
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- nextjs, typescript
Direzione di ricerca
Start with uploadRequiresServerValidation in payload/dist/uploads/getFileTypeIdentity.js, where an empty MIME type must route the file through the Payload server. Then read assertClientUploadAllowed in the Blob plugin and the earlier patch commit 1057f3cf1 to follow the existing patch convention. Done means a .kml or .gpx uploads to Documents on a preview deploy, typed files still use client uploads, and a regression test covers the empty-MIME case.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Uploading a .kml to Documents from the admin panel fails with a "Failed to initialize Vercel Blob client upload" toast. This started with #1365 (Bump the payloadcms group to 3.90.2), merged 2026-10-07. The last KMLs in production were uploaded before that.
Cause
- Chrome on macOS reports
File.typeas""for.kml(no registered MIME type)..gpxis likely the same. - The admin's
Formonly sends an upload through the Payload server whenuploadRequiresServerValidation(frompayload/shared) returns true. That checks for an.xml/.svgextension or an XML/SVG MIME type, and an empty type matches neither, so the admin takes the Vercel Blob client-upload path. - The Blob plugin's
issue-client-uploadrequest callsassertClientUploadAllowed, which since 3.90.2 rejects an empty MIME type with a 400 ("A valid MIME type is required for client uploads."). VercelBlobClientUploadHandlerturns any non-OK response into the generic toast.
clientUploads is plugin-wide, so it can't be turned off for Documents alone, and turning it off would cap every upload at Vercel's 4.5 MB request body limit.
Plan
- Patch Payload with
pnpm patch: makeuploadRequiresServerValidationinpayload/dist/uploads/getFileTypeIdentity.jsalso return true whenmimeTypeis empty, so those files go through the Payload server, which detects the type from the bytes. KML and GPX files are small, so the 4.5 MB limit doesn't matter. Add a regression test that says to delete the patch once upstream fixes it, as the earlier patches did (see 1057f3cf1). - Open an upstream issue on
payloadcms/payloadwith the repro: a file with no browser MIME type fails client upload with a generic error instead of falling back to a server upload. Link it here. - Remove the patch when the upstream fix ships.
Acceptance
- Uploading a
.kml(and.gpx) to Documents from the admin succeeds on a preview deploy with a Blob token. .pdf,.docxand other typed files still use client uploads.
- Lingua principale
- TypeScript
- Stelle
- 6
- Fork
- 2
- Merge medio
- 1g 11h
- PR unite (30g)
- 35
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NWACus/web
-
tech debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
bug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
tech debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement needs-triage tenant:a3
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
NWACus/web#1190 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NWACus/web#1154 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Media browser returns "Not found" for repositories using the SHA-256 object formatForse già presa @adamchodera l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Follow-ups from #312Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
janhesters/remixcn#318 ·
I maintainer di solito rispondono entro 1 giorno
-
Interceptor LaunchTestProfile.sh: no Windows (Git Bash/MSYS) branch, test profile never launchesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
danielmiessler/LifeOS#3150 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Make the "%" unit spacing the same in the web and in A10Forse già presa @kragent66-glitch l’ha presa oggi. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
maiychrus25/OpenTea-DX-OS#226 · 1 commento ·