|
Summary: |
Make it possible to get the metadata of a single attachment from the REST endpoints |
Issue Type: |
Improvement |
Affects Versions: |
16.9.0 |
Assignee: |
Unassigned |
Components: |
REST |
Created: |
14/Nov/24 17:11 |
Priority: |
Major |
Reporter: |
Manuel Leduc |
Description: |
Calling .../attachments returns array of attachments metadata like the json below. But, when calling .../attachments/{fileName}, the response is not a json object, but the file binary content and the mimetype. As a REST client, one needs to fully download the file, which is not optimal, and re-compute all the of the metadata that one could get from the server, which is not optimal either. The only other option is to call the .../attachments REST endpoint. But this is not optimal either as the list of attachments is not paginated and cannot be filtered.
{
"id": "xwiki:Sandbox.WebHome@xwikilogo_400x400.png",
"name": "xwikilogo_400x400.png",
"size": 79470,
"longSize": 79470,
"version": "1.1",
"pageId": "xwiki:Sandbox.WebHome",
"pageVersion": "39.1",
"mimeType": "image/png",
"author": "XWiki.Admin",
"authorName": null,
"date": 1731428868000,
"xwikiRelativeUrl": "http:,
"xwikiAbsoluteUrl": "http:
}
|
|