{"record":{"id":"2f055ec192beef95","repo":"langflow-ai/langflow","slug":"no-file-provided","errorCode":null,"errorMessage":"No file provided","messagePattern":"No file provided","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"src/backend/base/langflow/api/v1/flows.py","lineNumber":657,"sourceCode":"\n\n@router.post(\"/upload/\", response_model=list[FlowRead], status_code=201)\nasync def upload_file(\n    *,\n    session: DbSession,\n    file: Annotated[UploadFile | None, File()] = None,\n    current_user: CurrentActiveUser,\n    folder_id: UUID | None = None,\n    storage_service: Annotated[StorageService, Depends(get_storage_service)],\n):\n    \"\"\"Upload flows from a JSON or ZIP file (upsert semantics for flows with stable IDs).\"\"\"\n    # Authorization is enforced per-flow below, after parsing — the per-flow\n    # check uses the actual workspace_id/folder_id each uploaded flow targets.\n    # A coarse pre-parse check here would over-reject (it would authorize the\n    # caller against ``domain=\"*\", obj=\"flow:*\"`` regardless of where the\n    # uploaded flows actually land).\n    if file is None:\n        raise HTTPException(status_code=400, detail=\"No file provided\")\n\n    contents = await file.read()\n\n    if not contents:\n        raise HTTPException(status_code=400, detail=\"The uploaded file is empty\")\n\n    if zipfile.is_zipfile(io.BytesIO(contents)):\n        try:\n            flows_data = await extract_flows_from_zip(contents)\n        except ValueError as e:\n            raise HTTPException(status_code=400, detail=str(e)) from e\n        if not flows_data:\n            raise HTTPException(status_code=400, detail=\"No valid flow JSON files found in the ZIP\")\n        data = {\"flows\": flows_data}\n    else:\n        try:\n            data = orjson.loads(contents)\n        except orjson.JSONDecodeError as e:","sourceCodeStart":639,"sourceCodeEnd":675,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/v1/flows.py#L639-L675","documentation":"Error \"No file provided\" thrown in langflow-ai/langflow.","triggerScenarios":"Occurs when a flow upload request is made without attaching any file in the multipart form data.","commonSituations":"See trigger scenarios.","solutions":["Attach a file to the multipart request under the expected file field."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}