Project

General

Profile

Actions

Defect #30428

closed

API upload documentation is wrong

Added by Brennen Sprimont about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Documentation
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

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

Related to Redmine - Feature #12125: Set filename used to store attachment updloaded via the REST APIClosedJean-Philippe Lang

Actions
Actions #1

Updated by Go MAEDA about 5 years ago

  • Related to Feature #12125: Set filename used to store attachment updloaded via the REST API added
Actions #2

Updated by Go MAEDA about 5 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Thank you for pointing it out. You will see "Attachment extension is not allowed" error if you use "Allowed extensions" / "Disallowed extensions" feature.

I have updated two pages.

http://www.redmine.org/projects/redmine/wiki/Rest_api/diff?utf8=%E2%9C%93&version=100&version_from=99
https://www.redmine.org/projects/redmine/wiki/Rest_api_with_curl/diff?utf8=%E2%9C%93&version=9&version_from=8

Actions

Also available in: Atom PDF