Standardize extension to content type mapping?
Nessuno ha ancora preso questa issue.
- Lingua principale
- HTML
- Stelle
- 118
- Fork
- 52
- Merge medio
- 9g 16h
- PR unite (30g)
- 1
Descrizione
(This discussion could go here or HTML — which notes "Extensions tend to be ambiguous..." — but I'm guessing the right eyeballs will be here.)
When a File is minted via a drop operation or HTMLInputElement in Chrome, the content type is determined using platform-specific logic. e.g. on Windows the registry is used as is normal for the platform. There's also a small fallback list built into the browser. This causes behavior to differ for the same version of Chrome on the same OS depending on what applications are installed (e.g. .DOCX may be unknown if Office is not installed). Presumably this is also an interop issue across browsers on the same machine if different logic/lists are used is used.
Web applications should trust neither extensions nor content types. But should we attempt to standardize the behavior here in any way, e.g. an expected list of extension → type mappings, to avoid developer surprise?
I'm not strongly advocating for this, just wanted to kick off the discussion.
Guida per i contributori
Apri la 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.
Direzione di ricerca
Inizia dall’issue di File API e dal comportamento di HTMLInputElement a cui si fa riferimento. Confronta la mappatura specifica della piattaforma tra estensioni e tipi di contenuto descritta per Chrome con le note esistenti su File API e HTML. Il lavoro sarebbe completato una volta definita una direzione risolta per la specifica, ad esempio decidendo se sia necessaria una mappatura standardizzata e definendone l’ambito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- html
- Ambito
- api, web-dev
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100