Defect #30428
closedAPI upload documentation is wrong
0%
Description
All documentation on the "uploads" api endpoint appears to be outdated. It doesn't mention anything about a "filename" parameter anywhere and it's not in any examples. However, if the "filename" parameter is excluded, the request always fails with a 422 "extension is not allowed". It looks like this change was made 6 years ago: https://www.redmine.org/projects/redmine/repository/revisions/10678.
Please add mention of the "filename" parameter, how it is now required, and examples using it.
For example, on: http://www.redmine.org/projects/redmine/wiki/Rest_api_with_curl#Attaching-files
The new curl example should be: curl --data-binary "@image.png" -H "Content-Type: application/octet-stream" -X POST -u login:password http://redmine/uploads.xml?filename="image.png"
Thanks
Related issues