@@ -830,6 +830,7 @@ def download_url_inst_file(
830830 current_user: the user making the request.
831831 """
832832 file_name = decode_url_piece (file_name )
833+ print ("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$0:" + file_name )
833834 has_access_to_inst_or_err (inst_id , current_user )
834835 has_full_data_access_or_err (current_user , "file data" )
835836 if not file_name .startswith ("approved/" ) and not file_name .startswith (
@@ -839,6 +840,7 @@ def download_url_inst_file(
839840 status_code = status .HTTP_400_BAD_REQUEST ,
840841 detail = "This filepath is not allowed to be downloaded." ,
841842 )
843+ print ("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$1" )
842844 local_session .set (sql_session )
843845 query_result = (
844846 local_session .get ()
@@ -854,6 +856,7 @@ def download_url_inst_file(
854856 )
855857 .all ()
856858 )
859+ print ("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$2" )
857860 # This should only result in a match of a single file.
858861 if not query_result or len (query_result ) == 0 :
859862 raise HTTPException (
@@ -865,7 +868,6 @@ def download_url_inst_file(
865868 status_code = status .HTTP_500_INTERNAL_SERVER_ERROR ,
866869 detail = "File duplicates found." ,
867870 )
868- res = query_result [0 ][0 ]
869871 return storage_control .generate_download_signed_url (
870872 get_external_bucket_name (inst_id ), file_name
871873 )
0 commit comments