Open boney-bun opened 5 years ago
tested on safari, chrome and firefox.
the PR in action using safari:
@lucernae i've tried the content_type of application/xml
, but safari still automatically adding xml extention to the filename. so i define content_type of text/vnd.qt.qml
for qml file.
found this content type here: https://www.ietf.org/mail-archive/web/media-types/current/msg00465.html
@gubuntu @NyakudyaA can text/vnd.qt.qml
be used to define qml file in content type?
afaik Qt-QML is a completely different animal.
though if it serves to add the .qml suffix maybe it is OK?
Merging #541 into 2.8.x-qgis_server will decrease coverage by
7.95%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## 2.8.x-qgis_server #541 +/- ##
=====================================================
- Coverage 41.52% 33.56% -7.96%
=====================================================
Files 412 412
Lines 29670 29670
Branches 3752 3752
=====================================================
- Hits 12319 9958 -2361
- Misses 16589 19083 +2494
+ Partials 762 629 -133
Impacted Files | Coverage Δ | |
---|---|---|
geonode/qgis_server/views.py | 0% <ø> (-60.42%) |
:arrow_down: |
geonode/qgis_server/context_processors.py | 0% <0%> (-100%) |
:arrow_down: |
geonode/qgis_server/urls.py | 0% <0%> (-100%) |
:arrow_down: |
...ent/commands/delete_orphaned_qgis_server_layers.py | 0% <0%> (-100%) |
:arrow_down: |
geonode/qgis_server/tests/test_qgis_settings.py | 0% <0%> (-100%) |
:arrow_down: |
geonode/qgis_server/tests/test_xml_utilities.py | 0% <0%> (-100%) |
:arrow_down: |
.../qgis_server/migrations/0003_auto_20170727_0509.py | 0% <0%> (-100%) |
:arrow_down: |
.../qgis_server/migrations/0005_auto_20170823_0341.py | 0% <0%> (-100%) |
:arrow_down: |
geonode/qgis_server/migrations/0001_initial.py | 0% <0%> (-100%) |
:arrow_down: |
geonode/qgis_server/admin/__init__.py | 0% <0%> (-100%) |
:arrow_down: |
... and 48 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update ba48295...eff57a1. Read the comment docs.
Merging #541 into 2.8.x-qgis_server will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## 2.8.x-qgis_server #541 +/- ##
==================================================
Coverage 41.52% 41.52%
==================================================
Files 412 412
Lines 29670 29670
Branches 3752 3752
==================================================
Hits 12319 12319
Misses 16589 16589
Partials 762 762
Impacted Files | Coverage Δ | |
---|---|---|
geonode/qgis_server/views.py | 60.41% <ø> (ø) |
:arrow_up: |
geonode/qgis_server/tests/test_views.py | 99.28% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update ba48295...eff57a1. Read the comment docs.
@boney-bun respond and fix
For @gubuntu 's and @boney-bun 's comment:
@lucernae i've tried the content_type of application/xml, but safari still automatically adding xml extention to the filename. so i define content_type of text/vnd.qt.qml for qml file. found this content type here: https://www.ietf.org/mail-archive/web/media-types/current/msg00465.html
The original mime type follows from QGIS definition taken here: https://github.com/qgis/QGIS/blob/master/rpm/sources/qgis-mime.xml
There should be a way to force Safari to save the filename with QML extension (with mime type application/xml). This can be from Javascript file, communicated in the request header, or from download
attribute.
afaik Qt-QML is a completely different animal. though if it serves to add the .qml suffix maybe it is OK?
Yes, I think this is last resort though. If above suggestion still not feasible :(.
fix #536