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

[Fixes #1064] Expose supported upload file formats as configurations #1063

Merged
merged 2 commits into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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