mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 15:31:05 +08:00
Fix: Correct the API path (#15204)
Follow on PR #15146 to reslove the backwad compatability issue. 1. /agents/<attachment_id>/download -> /agents/attachments/<attachment_id>/download ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -6908,18 +6908,18 @@ Failure:
|
||||
##### Request example
|
||||
|
||||
```bash
|
||||
curl --request GET \
|
||||
curl --request GET \
|
||||
--url 'http://{address}/api/v1/agents/attachments/{attachment_id}/download?ext=pdf' \
|
||||
--header 'Authorization: Bearer <YOUR_API_KEY>' \
|
||||
--output ./downloaded_attachment.pdf
|
||||
--output ./downloaded_attachment.pdf
|
||||
```
|
||||
|
||||
##### Request parameters
|
||||
##### Request parameters
|
||||
|
||||
- `attachment_id`: (*Path parameter*), `string`, *Required*
|
||||
The attachment ID whose file should be downloaded.
|
||||
- `ext`: (*Query parameter*), `string`, *Optional*
|
||||
A file extension hint specifying the response's Content-Type. Defaults to `"markdown"`. Available values:
|
||||
A file extension hint specifying the response's Content-Type. Defaults to `"markdown"`. Available values:
|
||||
- `"markdown"`
|
||||
- `"html"`
|
||||
- `"pdf"`
|
||||
@@ -6929,15 +6929,15 @@ Downloads a runtime attachment previously uploaded via the [Upload document](#up
|
||||
|
||||
#### Response
|
||||
|
||||
Success:
|
||||
Success:
|
||||
|
||||
Returns the file content as a binary stream with the relevant Content-Type header.
|
||||
|
||||
Failure:
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 500,
|
||||
{
|
||||
"code": 500,
|
||||
"message": "Internal server error"
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user