Skip to content

Commit

Permalink
fix the DocumentUpdateByFileApi for the same problem
Browse files Browse the repository at this point in the history
  • Loading branch information
lyfuci committed Jan 2, 2025
1 parent 7630d84 commit 6f1de8d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/controllers/service_api/dataset/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ def post(self, tenant_id, dataset_id, document_id):
raise FileTooLargeError(file_too_large_error.description)
except services.errors.file.UnsupportedFileTypeError:
raise UnsupportedFileTypeError()
data_source = {"type": "upload_file", "info_list": {"file_info_list": {"file_ids": [upload_file.id]}}}
data_source = {
"type": "upload_file",
"info_list": {"data_source_type": "upload_file", "file_info_list": {"file_ids": [upload_file.id]}},
}
args["data_source"] = data_source
# validate args
args["original_document_id"] = str(document_id)
Expand Down

0 comments on commit 6f1de8d

Please sign in to comment.