Skip to content

Commit

Permalink
fix importing geojson files on firefox on linux (#9912)
Browse files Browse the repository at this point in the history
for some reason mimetype is detected as application/geo+json
  • Loading branch information
landryb committed Jan 25, 2024
1 parent fa7bf64 commit 40b3a23
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const checkFileType = (file) => {
|| type === 'application/vnd.google-earth.kml+xml'
|| type === 'application/vnd.google-earth.kmz'
|| type === 'application/gpx+xml'
|| type === 'application/geo+json'
|| type === 'application/json'
|| type === 'application/vnd.wmc') {
resolve(file);
Expand Down
1 change: 1 addition & 0 deletions web/client/plugins/longitudinalProfile/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const LONGITUDINAL_VECTOR_LAYER_ID_POINT = 'longitudinal_profile_tool_poi
export const LONGITUDINAL_OWNER = 'LongitudinalTool';
export const FILE_TYPE_ALLOWED = [
"application/json",
"application/geo+json",
"image/x-dxf",
"image/vnd.dxf",
"application/x-zip-compressed",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const readFile = (onWarnings) => (file) => {
const projectionDefs = getConfigProp('projectionDefs') || [];
const supportedProjections = (projectionDefs.length && projectionDefs.map(({code}) => code) || []).concat(["EPSG:4326", "EPSG:3857", "EPSG:900913"]);
// [ ] change this to use filterCRSList
if (type === 'application/json') {
if (type === 'application/json' || type === 'application/geo+json') {
return readJson(file).then(f => {
const projection = get(f, 'map.projection') ?? parseURN(get(f, 'crs'));
if (projection) {
Expand Down

0 comments on commit 40b3a23

Please sign in to comment.