Skip to content

Commit

Permalink
[Fixes #1064] Expose supported upload file formats as configurations (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidQuartz authored Jul 6, 2022
1 parent 080c493 commit dbb8661
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion geonode_mapstore_client/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from django.conf import settings

from geonode.upload.utils import get_max_upload_size, get_max_upload_parallelism_limit
from geonode.utils import get_supported_file_types

def resource_urls(request):
"""Global values to pass to templates"""
Expand Down Expand Up @@ -54,6 +55,7 @@ def resource_urls(request):
'OPTIONS',
dict()).get(
'MOSAIC_ENABLED',
False)
False),
'SUPPORTED_DATASET_FILE_TYPES': get_supported_file_types()
}
return defaults
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
const pluginsConfigPatchRules = geoNodeSettings.PLUGINS_CONFIG_PATCH_RULES || [];
const translationsPath = geoNodeSettings.TRANSLATIONS_PATH;
const extensionsFolder = geoNodeSettings.EXTENSIONS_FOLDER_PATH;
const supportedDatasetFileTypes = geoNodeSettings.SUPPORTED_DATASET_FILE_TYPES;

const isEmbed = checkBoolean('{{ is_embed }}') || false;
const pluginsConfigKey = '{{ plugins_config_key }}';
Expand Down Expand Up @@ -126,7 +127,10 @@
isMobile: isMobile,
datasetMaxUploadSize: datasetMaxUploadSize,
documentMaxUploadSize: documentMaxUploadSize,
maxParallelUploads: maxParallelUploads
maxParallelUploads: maxParallelUploads,
upload: {
supportedDatasetFileTypes: supportedDatasetFileTypes
}
},
geoNodeConfiguration: {
cardsMenu: {
Expand Down

0 comments on commit dbb8661

Please sign in to comment.