Skip to content

Commit

Permalink
[profiletool] fix importing geojson files on firefox on linux (#9912) (
Browse files Browse the repository at this point in the history
…#9913)

Fix #9912 for some reason mimetype is detected as application/geo+json
  • Loading branch information
landryb authored Jan 22, 2025
1 parent 66ad7a1 commit 4109733
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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 4109733

Please sign in to comment.