MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / upload_instructions

Function upload_instructions

src/opencdeserver/api/app/api/documents.py:174–193  ·  view source on GitHub ↗
(
    session_id: str,
    server_context: str,
    upload_files: UploadFileDetails,
    current_user: User = Depends(get_current_active_user),
)

Source from the content-addressed store, hash-verified

172
173@router.post("/documents/1.0/upload-instructions", tags=[""])
174def upload_instructions(
175 session_id: str,
176 server_context: str,
177 upload_files: UploadFileDetails,
178 current_user: User = Depends(get_current_active_user),
179) -> DocumentsToUpload:
180 documents_to_upload_model = DocumentsToUpload()
181 documents_to_upload_model.server_context = server_context
182 documents_to_upload_model.documents_to_upload = list()
183 for upload_file in upload_files.files:
184 get_upload_instructions_response = doc_db.get_upload_instructions(
185 session_id, server_context, upload_file, current_user
186 )
187 doc_db.debug(
188 endpoint="upload_instructions",
189 request={"session_id": session_id, "server_context": server_context, "document": upload_file},
190 response=get_upload_instructions_response.dict(),
191 )
192 documents_to_upload_model.documents_to_upload.append(get_upload_instructions_response)
193 return documents_to_upload_model
194
195
196# ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----

Callers

nothing calls this directly

Calls 4

DocumentsToUploadClass · 0.85
debugMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected