Add file upload for attachments

This commit is contained in:
Justin Nuß committed 2014-07-24 15:19:59 +02:00
1 parent 43e5de7f83
commit bfe5b86004
9 files changed
+132 -303

No files matched your search

-18
View File
@@ -1085,21 +1085,3 @@ func DeleteAttachmentsByComment(commentId int64, remove bool) (int, error) {
return DeleteAttachments(attachments, remove)
}
// AssignAttachment assigns the given attachment to the specified comment
func AssignAttachment(issueId, commentId, attachmentId int64) error {
a, err := GetAttachmentById(attachmentId)
if err != nil {
return err
}
if a.IssueId != issueId {
return ErrAttachmentNotLinked
}
a.CommentId = commentId
_, err = x.Id(a.Id).Update(a)
return err
}