flip_api.file_services.uploaded_file ==================================== .. py:module:: flip_api.file_services.uploaded_file Attributes ---------- .. autoapisummary:: flip_api.file_services.uploaded_file.router Functions --------- .. autoapisummary:: flip_api.file_services.uploaded_file.process_scanned_file Module Contents --------------- .. py:data:: router .. py:function:: process_scanned_file(model_id: uuid.UUID, file: str, db: sqlmodel.Session = Depends(get_session), user_id: uuid.UUID = Depends(verify_token)) -> dict[str, str] Process a scanned file message from SNS. This endpoint receives SNS notifications about scanned files, updates the database, and manages the files in S3 buckets. :param model_id: The ID of the model the file belongs to, extracted from the file's key :param file: The name of the file, extracted from the file's key :param db: Database session :param user_id: ID of the user making the request, obtained from authentication :returns: A message indicating the result of the file processing :rtype: dict[str, str] :raises HTTPException: 403 if the caller is not allowed to modify the model, or 500 if the file cannot be processed.