diff --git a/src/backend/app/projects/image_processing.py b/src/backend/app/projects/image_processing.py index f9b6020d..ae74ced9 100644 --- a/src/backend/app/projects/image_processing.py +++ b/src/backend/app/projects/image_processing.py @@ -49,7 +49,9 @@ def options_list_to_dict(self, options=[]): return opts def download_object(self, bucket_name: str, obj, images_folder: str): - if obj.object_name.endswith((".jpg", ".jpeg", ".JPG", ".png", ".PNG")): + if obj.object_name.endswith( + (".jpg", ".jpeg", ".JPG", ".png", ".PNG", ".txt", ".laz") + ): # Images and GCP File local_path = Path(images_folder) / Path(obj.object_name).name local_path.parent.mkdir(parents=True, exist_ok=True) get_file_from_bucket(bucket_name, obj.object_name, local_path) @@ -86,7 +88,13 @@ def list_images(self, directory): path = Path(directory) for file in path.rglob("*"): - if file.suffix.lower() in {".jpg", ".jpeg", ".png"}: + if file.suffix.lower() in { + ".jpg", + ".jpeg", + ".png", + ".txt", + ".laz", + }: # Images, GCP File, and align.laz images.append(str(file)) return images diff --git a/src/frontend/src/components/DroneOperatorTask/DescriptionSection/UploadsBox/index.tsx b/src/frontend/src/components/DroneOperatorTask/DescriptionSection/UploadsBox/index.tsx index c88c0ae0..c7f91783 100644 --- a/src/frontend/src/components/DroneOperatorTask/DescriptionSection/UploadsBox/index.tsx +++ b/src/frontend/src/components/DroneOperatorTask/DescriptionSection/UploadsBox/index.tsx @@ -6,7 +6,11 @@ import { toggleModal } from '@Store/actions/common'; import { setFiles } from '@Store/actions/droneOperatorTask'; import { useTypedDispatch, useTypedSelector } from '@Store/hooks'; -const UploadsBox = ({ label = 'Upload Raw Image' }: { label?: string }) => { +const UploadsBox = ({ + label = 'Upload Images, GCP, and align.laz', +}: { + label?: string; +}) => { const dispatch = useTypedDispatch(); const files = useTypedSelector(state => state.droneOperatorTask.files); const handleFileChange = (event: any) => { @@ -34,9 +38,18 @@ const UploadsBox = ({ label = 'Upload Raw Image' }: { label?: string }) => { cloud_upload -

- The supported file formats are .jpg, .jpeg, .png -

+
+

+ The supported file formats are .jpg, .jpeg, .png. +

+

+ The GCP file should be named gcp_list.txt +

+

+ The align file should be named align.laz +

+
+ {files.length > 0 && (

{files.length} items selected diff --git a/src/frontend/src/constants/modalContents.tsx b/src/frontend/src/constants/modalContents.tsx index 0ffc584c..f31689ed 100644 --- a/src/frontend/src/constants/modalContents.tsx +++ b/src/frontend/src/constants/modalContents.tsx @@ -36,7 +36,7 @@ export function getModalContent(content: ModalContentsType): ModalReturnType { case 'raw-image-preview': return { className: '!naxatw-w-[95vw] md:!naxatw-w-[60vw]', - title: 'Upload Raw Image', + title: 'Upload Images, GCP, and align.laz', content: , };