ZIP imports fail on uncommon filetypes
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza siguiendo la ruta de importación de ZIP y cómo manifest.json y la biblioteca mimetypes de Python determinan ContentType. Compárala con la ruta de subida del navegador para tipos poco comunes como .webp y .avif. Se considera terminado cuando las importaciones de ZIP gestionen archivos aceptados sin el error de validación indicado y exista cobertura para los tipos de archivo afectados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
In Zendesk 9788, a user reported this error being displayed when they tried to import a ZIP created using the export function originally discussed in #304
Parameter validation failed: Invalid type for parameter ContentType, value: None, type: , valid types:
It turns out that the python mimetypes library on our production system fails to guess the type of .webp and .avif files, among others. There's an asymmetry in that, when uploaded, the browser reports the mime type, so users of the editor can introduce these files without a hitch, but the import process doesn't know what the mimetype was.
The workaround, in this case, was to remove the problem files from the ZIP, import the rest of the archive, and then use the editor to re-upload the single .webp file which was actually being used (the rest were not used in the storymap)
A partial solution would be to configure mimetypes to understand more filetypes. .webp seems pretty natural. I was unfamiliar with .avif but CanIUse reports that most browsers except Edge support it. Still, this kind of kicks the can down the road without necessarily solving it.
Another option, which may not actually be possible, would be to write the mime types into the manifest.json included in the export ZIP, if we can recover them, perhaps from boto. Using this instead of "guessing" should ensure that any file we've accepted through the editor can also be accepted through the import.
See also #487 which suggests limiting which files are included in exports. In this case it would have filtered out most, but not all, of the uncommon filetypes.
- Lenguaje dominante
- JavaScript
- Estrellas
- 248
- Forks
- 61
- Merge medio
- 1 min
- PR fusionados (30 d)
- 1
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NUKnightLab/StoryMapJS
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
NUKnightLab/StoryMapJS#507 ·
-
Visual glitches Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
NUKnightLab/StoryMapJS#506 ·
-
Provide a npm distribution Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
NUKnightLab/StoryMapJS#505 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 50/100
NUKnightLab/StoryMapJS#495 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
NUKnightLab/StoryMapJS#487 ·
Todos los issues de NUKnightLab/StoryMapJS
Issues similares
-
Update HugeIcons library Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
antfu-collective/icones#398 ·
-
ECmail.com Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
wesbos/burner-email-providers#554 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
components-web-app/docs#92 ·