Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.geojson file not supported with mac os #10081

Closed
congchen1101 opened this issue Mar 19, 2024 · 0 comments · Fixed by #10082 or #10625
Closed

.geojson file not supported with mac os #10081

congchen1101 opened this issue Mar 19, 2024 · 0 comments · Fixed by #10082 or #10625
Assignees
Milestone

Comments

@congchen1101
Copy link
Contributor

Description

With MacOS .geojson files will be identified as "application/geo+json" type. So the current code will not look for it in MIME_LOOKUP list.

How to reproduce

  • use a mac os system
  • go into one map
  • click the import button(import a map file or vector data) from sidebar menu in the right side of the page
  • select one .geojson file to import

Expected Result
a modal which can configure the style for this geojson data should appear.

Current Result
file not supported message showed

Other useful information

Screen Shot 2024-03-19 at 09 31 57 AM

congchen1101 added a commit to congchen1101/MapStore2 that referenced this issue Mar 19, 2024
FixBug .geojson file not supported in macos.
- In macOS .geojson file will be identified as type of "application/geo+json". So in checkFileType and readFile functions, they will not go into MIME_LOOKUPS list to find the corresponding type.
- Check first in MIME_LOOKUPS list and then the file.type will solve this problem.
On behalf of DB Systel GmbH
@tdipisa tdipisa linked a pull request Apr 9, 2024 that will close this issue
12 tasks
@tdipisa tdipisa added this to the 2024.01.01 milestone Apr 9, 2024
@tdipisa tdipisa added the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Apr 24, 2024
@tdipisa tdipisa modified the milestones: 2024.01.01, 2024.02.00 May 28, 2024
@tdipisa tdipisa modified the milestones: 2024.02.00, 2024.02.01 Aug 28, 2024
dsuren1 pushed a commit that referenced this issue Oct 21, 2024
* #10081
FixBug .geojson file not supported in macos.
- In macOS .geojson file will be identified as type of "application/geo+json". So in checkFileType and readFile functions, they will not go into MIME_LOOKUPS list to find the corresponding type.
- Check first in MIME_LOOKUPS list and then the file.type will solve this problem.
On behalf of DB Systel GmbH

* #10082
FixBug .geojson file not supported in macos.
- added codes to support geojson in processFiles.jsx
- fixed bug in testData.js in order to give a type by initialing a new File instance

On behalf of DB Systel GmbH
dsuren1 pushed a commit to dsuren1/MapStore2 that referenced this issue Oct 22, 2024
* geosolutions-it#10081
FixBug .geojson file not supported in macos.
- In macOS .geojson file will be identified as type of "application/geo+json". So in checkFileType and readFile functions, they will not go into MIME_LOOKUPS list to find the corresponding type.
- Check first in MIME_LOOKUPS list and then the file.type will solve this problem.
On behalf of DB Systel GmbH

* geosolutions-it#10082
FixBug .geojson file not supported in macos.
- added codes to support geojson in processFiles.jsx
- fixed bug in testData.js in order to give a type by initialing a new File instance

On behalf of DB Systel GmbH

(cherry picked from commit afafc5c)
@ElenaGallo ElenaGallo self-assigned this Oct 23, 2024
tdipisa pushed a commit that referenced this issue Oct 24, 2024
* #10081
FixBug .geojson file not supported in macos.
- In macOS .geojson file will be identified as type of "application/geo+json". So in checkFileType and readFile functions, they will not go into MIME_LOOKUPS list to find the corresponding type.
- Check first in MIME_LOOKUPS list and then the file.type will solve this problem.
On behalf of DB Systel GmbH

* #10082
FixBug .geojson file not supported in macos.
- added codes to support geojson in processFiles.jsx
- fixed bug in testData.js in order to give a type by initialing a new File instance

On behalf of DB Systel GmbH

(cherry picked from commit afafc5c)

Co-authored-by: congchen1101 <161452326+congchen1101@users.noreply.github.com>
@tdipisa tdipisa removed the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Oct 24, 2024
rmelarab-ngs pushed a commit to ngsllc/MapStore2 that referenced this issue Nov 5, 2024
* geosolutions-it#10081
FixBug .geojson file not supported in macos.
- In macOS .geojson file will be identified as type of "application/geo+json". So in checkFileType and readFile functions, they will not go into MIME_LOOKUPS list to find the corresponding type.
- Check first in MIME_LOOKUPS list and then the file.type will solve this problem.
On behalf of DB Systel GmbH

* geosolutions-it#10082
FixBug .geojson file not supported in macos.
- added codes to support geojson in processFiles.jsx
- fixed bug in testData.js in order to give a type by initialing a new File instance

On behalf of DB Systel GmbH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment