nextgisweb
nextgisweb copied to clipboard
Check if uploaded filename doesn't end with zip, json, geojson, tiff, tif
- Do not show unsupported extensions
- If DnD is used, provide a more helpful error message than "GDAL cannot open...", something like:
Raster layer
"We only support GeoTIFF (*.tif, *.tiff) files at this point. Please try again."
"На данный момент вы можете загружать только файлы GeoTIFF (*.tif, *.tiff). Попробуйте еще раз."
Vector layer
"We only support ESRI Shapefile (.zip) or GeoJSON (.geojson, *.zip) files at this point. Please try again."
"На данный момент вы можете загружать только shape-файлы (.zip) или данные в формате GeoJSON (.geojson, *.zip)."
Загрузчик научился фильтровать форматы в диалоге выбора файла https://github.com/nextgis/nextgisweb/blob/d6ccb23c909f3021ebab2d60cc74e3165cd4935a/nextgisweb/file_upload/amd/ngw-file-upload/ImageUploader.js#L40