Project

General

Profile

Actions

Patch #14828

closed

Patch to add support for deleting attachments via API

Added by Michael Medin over 10 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Category:
REST API
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

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


Files

patch.diff (1.12 KB) patch.diff patch by Oliver Luethi Go MAEDA, 2016-03-23 09:26
add_support_for_deleting_attachments_via_api_trunk_r15327.patch (1.88 KB) add_support_for_deleting_attachments_via_api_trunk_r15327.patch Takenori TAKAKI, 2016-04-12 02:51

Related issues

Related to Redmine - Feature #17879: support deleting attachmentsClosed

Actions
Has duplicate Redmine - Patch #22308: delete attachments over REST APIClosed

Actions
Actions

Also available in: Atom PDF