diff --git a/src/discrete-layer/components/dialogs/file-picker.dialog.tsx b/src/discrete-layer/components/dialogs/file-picker.dialog.tsx index 9621f40e..b8305ba2 100644 --- a/src/discrete-layer/components/dialogs/file-picker.dialog.tsx +++ b/src/discrete-layer/components/dialogs/file-picker.dialog.tsx @@ -45,6 +45,7 @@ interface FilePickerDialogProps { onSetOpen: (open: boolean) => void; onFilesSelection: (selected: Selection) => void; selection: Selection; + fetchMetaData?: boolean; } const getSuffixFromFolderChain = (folderChain: FileData[]): string => { @@ -58,6 +59,7 @@ export const FilePickerDialog: React.FC = observer( onSetOpen, onFilesSelection, selection: currentSelection, + fetchMetaData=true, }) => { const filePickerRef = useRef(null); const [files, setFiles] = useState([]); @@ -118,7 +120,7 @@ export const FilePickerDialog: React.FC = observer( const hasMetadata = dirContent.some( (file) => file.name === 'metadata.json' ); - if (hasMetadata) { + if (hasMetadata && fetchMetaData) { queryMetadata.setQuery( store.queryGetFile({ data: { diff --git a/src/discrete-layer/components/layer-details/ingestion-fields.tsx b/src/discrete-layer/components/layer-details/ingestion-fields.tsx index 3ca77a6f..d57f21d9 100644 --- a/src/discrete-layer/components/layer-details/ingestion-fields.tsx +++ b/src/discrete-layer/components/layer-details/ingestion-fields.tsx @@ -46,6 +46,7 @@ interface IngestionFieldsProps { metadata: MetadataFile ) => void; formik?: EntityFormikHandlers; + manageMetadata?: boolean; } const FileItem: React.FC<{ file: FileData }> = ({ file }) => { @@ -171,6 +172,7 @@ export const IngestionFields: React.FC> reloadFormMetadata, formik, children, + manageMetadata=true, }) => { const intl = useIntl(); const store = useStore(); @@ -453,6 +455,8 @@ export const IngestionFields: React.FC> + { + manageMetadata && + } {children} @@ -502,6 +507,7 @@ export const IngestionFields: React.FC> onSetOpen={setFilePickerDialogOpen} onFilesSelection={onFilesSelection} selection={selection} + fetchMetaData={manageMetadata} /> } diff --git a/src/discrete-layer/components/layer-details/raster/layer-datails-form.raster.tsx b/src/discrete-layer/components/layer-details/raster/layer-datails-form.raster.tsx index 346f64ce..f0165c38 100644 --- a/src/discrete-layer/components/layer-details/raster/layer-datails-form.raster.tsx +++ b/src/discrete-layer/components/layer-details/raster/layer-datails-form.raster.tsx @@ -747,6 +747,7 @@ export const InnerRasterForm = ( values={values} isError={showCurtain} onErrorCallback={setShowCurtain} + manageMetadata={false} >