From 93389e6f6ac484df747bf8ae6ab209e561248131 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 17 Sep 2013 12:51:19 +0800 Subject: Bug 916889: Bug.attachment webservice calls should return the size of the attachment --- Bugzilla/WebService/Bug.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Bugzilla/WebService') diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 298c53543..8344a2eba 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -1089,6 +1089,10 @@ sub _attachment_to_hash { $item->{'data'} = $self->type('base64', $attach->data); } + if (filter_wants $filters, 'size') { + $item->{'size'} = $self->type('int', $attach->datasize); + } + if (filter_wants $filters, 'flags') { $item->{'flags'} = [ map { $self->_flag_to_hash($_) } @{$attach->flags} ]; } @@ -1519,6 +1523,10 @@ diagram above) are: C The raw data of the attachment, encoded as Base64. +=item C + +C The length (in bytes) of the attachment. + =item C C The time the attachment was created. -- cgit v1.2.3-24-g4f1b