4848 FileUploadData ,
4949 UploadLinks ,
5050)
51- from ...models .schemas .jobs import ClientFileInProgramJob
51+ from ...models .schemas .jobs import ClientFileToProgramJob
5252from ...services_http .storage import StorageApi , StorageFileMetaData , to_file_api_model
5353from ...services_http .webserver import AuthSession
5454from ..dependencies .authentication import get_current_user_id
@@ -108,11 +108,11 @@ async def _get_file(
108108
109109
110110async def _create_domain_file (
111- webserver_api : AuthSession , client_file : ClientFile | ClientFileInProgramJob
111+ webserver_api : AuthSession , client_file : ClientFile | ClientFileToProgramJob
112112) -> DomainFile :
113113 if isinstance (client_file , ClientFile ):
114114 file = client_file .to_domain_model ()
115- elif isinstance (client_file , ClientFileInProgramJob ):
115+ elif isinstance (client_file , ClientFileToProgramJob ):
116116 project = await webserver_api .get_project (project_id = client_file .job_id )
117117 if len (project .workbench ) > 1 :
118118 raise HTTPException (
@@ -270,7 +270,7 @@ async def upload_files(files: list[UploadFile] = FileParam(...)):
270270@cancel_on_disconnect
271271async def get_upload_links (
272272 request : Request ,
273- client_file : ClientFileInProgramJob | ClientFile ,
273+ client_file : ClientFileToProgramJob | ClientFile ,
274274 user_id : Annotated [PositiveInt , Depends (get_current_user_id )],
275275 webserver_api : Annotated [AuthSession , Depends (get_webserver_session )],
276276):
@@ -382,7 +382,7 @@ async def delete_file(
382382async def abort_multipart_upload (
383383 request : Request ,
384384 file_id : UUID ,
385- client_file : Annotated [ClientFileInProgramJob | ClientFile , Body (..., embed = True )],
385+ client_file : Annotated [ClientFileToProgramJob | ClientFile , Body (..., embed = True )],
386386 storage_client : Annotated [StorageApi , Depends (get_api_client (StorageApi ))],
387387 user_id : Annotated [PositiveInt , Depends (get_current_user_id )],
388388 webserver_api : Annotated [AuthSession , Depends (get_webserver_session )],
@@ -409,7 +409,7 @@ async def abort_multipart_upload(
409409async def complete_multipart_upload (
410410 request : Request ,
411411 file_id : UUID ,
412- client_file : Annotated [ClientFileInProgramJob | ClientFile , Body (...)],
412+ client_file : Annotated [ClientFileToProgramJob | ClientFile , Body (...)],
413413 uploaded_parts : Annotated [FileUploadCompletionBody , Body (...)],
414414 storage_client : Annotated [StorageApi , Depends (get_api_client (StorageApi ))],
415415 user_id : Annotated [PositiveInt , Depends (get_current_user_id )],
0 commit comments