Edgewall Software
Modify

Opened 17 years ago

Closed 16 years ago

#6023 closed enhancement (fixed)

trac-admin should support attachments

Reported by: ben@… Owned by: Remy Blank
Priority: normal Milestone: 0.12
Component: admin/console Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

It would be handy to manipulate attachments from trac-admin, especially for attaching large files that I already have on the server.

Attachments (1)

console.py.diff (3.0 KB ) - added by ben@… 17 years ago.
Implementation of attachment add|list|remove

Download all attachments as: .zip

Change History (5)

by ben@…, 17 years ago

Attachment: console.py.diff added

Implementation of attachment add|list|remove

comment:1 by Christian Boos, 17 years ago

Milestone: 0.12

Thanks for the patch, looks good.

I'll use that as a sample case for TracAdmin modularization.

comment:2 by Remy Blank, 16 years ago

Milestone: 0.130.12
Owner: changed from Christopher Lenz to Remy Blank

Now that TracAdmin is modularized, this patch could be adapted and implemented cleanly in the attachment module. I'll give it a try.

I'll probably also add attachment get, as it's not quite trivial to get it directly from the environment folder, due to file name encoding.

comment:3 by Christian Boos, 16 years ago

Perfect! Please go ahead.

comment:4 by Remy Blank, 16 years ago

Resolution: fixed
Status: newclosed

New commands added in [7939]:

  • attachment add: Attach a file to a resource.
  • attachment export: Export an attachment from a resource to a file or stdout.
  • attachment list: List attachments of a resource.
  • attachment remove: Remove an attachment from a resource.

Contrary to the patch in attachment:console.py.diff, the resource is not specified as separate realm and id arguments, but in the more familiar realm:id format.

Ben, thanks for your patch. Even though I couldn't use it as-is, it contained all the necessary logic.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.