chore: add deprecation flag on base upload flow route (#4717)

* add deprecation flag on base upload flow route

* add deprecation flag on base upload flow route

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Jordan Frazier 2024-11-19 12:05:23 -08:00 committed by GitHub
commit e7e364eb0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -544,11 +544,16 @@ async def get_task_status(task_id: str) -> TaskStatusResponse:
@router.post(
"/upload/{flow_id}",
status_code=HTTPStatus.CREATED,
deprecated=True,
)
async def create_upload_file(
file: UploadFile,
flow_id: UUID,
) -> UploadFileResponse:
"""Upload a file for a specific flow (Deprecated).
This endpoint is deprecated and will be removed in a future version.
"""
try:
flow_id_str = str(flow_id)
file_path = save_uploaded_file(file, folder_name=flow_id_str)