Closed jusabatier closed 2 years ago
Related with https://github.com/georchestra/cadastrapp/issues/615
With the last MaJ of cadastrapp (https://github.com/georchestra/cadastrapp/pull/598) which uses more recent libraries, we have some problems with file downloads on Chrome/Chromium for BP/RP and CSV.
Searching some solutions, it appear that character " in filename can be replaced by _ when handled by UI.
"
_
I think the problem can be here : https://github.com/georchestra/mapstore2-cadastrapp/blob/ae71948e206c188fbde35417e495f103c76f58e1/js/extension/utils/download.js#L29
This regexp match the filename with ".
Should be replaced by :
if (contentDisposition) { const fileNameMatch = contentDisposition.match(/filename[^;=\n]*=(['"])(.*?\2|[^;\n]*)(['"])/); if (fileNameMatch.length > 3 && fileNameMatch[2]) { name = fileNameMatch[2]; } }
It look like it's solved with last release (rc20)
Related with https://github.com/georchestra/cadastrapp/issues/615
With the last MaJ of cadastrapp (https://github.com/georchestra/cadastrapp/pull/598) which uses more recent libraries, we have some problems with file downloads on Chrome/Chromium for BP/RP and CSV.
Searching some solutions, it appear that character
"
in filename can be replaced by_
when handled by UI.I think the problem can be here : https://github.com/georchestra/mapstore2-cadastrapp/blob/ae71948e206c188fbde35417e495f103c76f58e1/js/extension/utils/download.js#L29
This regexp match the filename with
"
.Should be replaced by :