fix importing geojson files on firefox on linux/openbsd #9912
Labels
BackportNeeded
Commits provided for an issue need to be backported to the milestone's stable branch
bug
Milestone
Description
using the profiletool from #9241, on master in firefox 122 it fails to recognize a valid geojson file (attached)
after looking in the developer console,
file.type
isapplication/geo+json
in https://github.com/geosolutions-it/MapStore2/blob/master/web/client/plugins/longitudinalProfile/enhancers/processFile.js#L38 which isnt included in the list of supported mimetypes (eg onlyapplication/json
)looking into it, importing geojson files is globally broken because of a similar mimetype check in https://github.com/geosolutions-it/MapStore2/blob/master/web/client/components/import/dragZone/enhancers/processFiles.jsx#L50
How to reproduce
try to import
test2154.json (rename to test2154.geojson)
in a mapstore instance with EPSG:2154 defined
Expected Result
a profile should be computed from it (if the coverage is on the json area)
Current Result
profiletool says File not supported
with a mimetype fix, importing the file as a vector file goes further but fails with
You provided 'null' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
but that should be another problem
Browser info
(use this site: https://www.whatsmybrowser.org/ for non expert users)Other useful information
Simple PR coming
The text was updated successfully, but these errors were encountered: