Vote #74345
完了Patch to add support for deleting attachments via API
0%
説明
A patch to add support for deleting attachments via the REST API:
app/controllers/attachments_controller.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index 5a816a7..31fcb8a 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -21,7 +21,7 @@ class AttachmentsController < ApplicationController
before_filter :delete_authorize, :only => :destroy
before_filter :authorize_global, :only => :upload
- accept_api_auth :show, :download, :upload
+ accept_api_auth :show, :download, :upload, :destroy
def show
respond_to do |format|
Usage:
DELETE /attachments/[id].[format]
// Michael Medin
journals
Its working fine!
Thank you!
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Here is an updated patch by "Oliver Luethi":http://www.redmine.org/users/148121 (#22308) : attachment:patch.diff
--------------------------------------------------------------------------------
I have updated the patch as below:
* Compatible with latest trunk (r15327)
* Added test-codes
I would be very happy if I could see the feature in Redmine 3.3.0.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Committed, thanks.
--------------------------------------------------------------------------------
related_issues
relates,Closed,17879,support deleting attachments
duplicates,Closed,22308,delete attachments over REST API