Project

General

Profile

Actions

Patch #14828

closed

Patch to add support for deleting attachments via API

Added by Michael Medin over 11 years ago. Updated over 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 #1

Updated by Emmanuel Mathot about 11 years ago

Its working fine!
Thank you!

Actions #2

Updated by Go MAEDA almost 9 years ago

Actions #3

Updated by Go MAEDA over 8 years ago

  • Has duplicate Patch #22308: delete attachments over REST API added
Actions #4

Updated by Go MAEDA over 8 years ago

  • Target version set to Candidate for next major release
Actions #5

Updated by Go MAEDA over 8 years ago

Here is an updated patch by Oliver Luethi (#22308) : patch.diff

Actions #6

Updated by Takenori TAKAKI over 8 years ago

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.

Actions #7

Updated by Jean-Philippe Lang over 8 years ago

  • Target version changed from Candidate for next major release to 3.3.0
Actions #8

Updated by Jean-Philippe Lang over 8 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang

Committed, thanks.

Actions

Also available in: Atom PDF