Project

General

Profile

Action "add_attachment" not supported by the API.

Added by Kevin Tomba over 10 years ago

I'm working on a plugin which allow the user to synchronise his Dropbox with the Redmine documents, I created the two HTTP POST requests (the first one in order to get the token, then the second to attach the file to the document), everything is working pretty well except this:

During the second request, I get a 401 Unauthorized error. After some research, I found out that it's because the find_current_user method located in the ApplicationController does not return the user, and this because accept_api_auth? returns false (thus it's not getting in the if statement).

I wasn't able to find a list (or something) with the allowed actions, can you help me on this?

This action is maybe not allowed by the Redmine API, I can modify the code to allows it but I would like to do it "properly". Do you know if this is supported by the API?

I can post my code if you need it.

Thanks