diff options
author | Byron Jones <bjones@mozilla.com> | 2013-09-17 06:51:19 +0200 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2013-09-17 06:51:19 +0200 |
commit | 93389e6f6ac484df747bf8ae6ab209e561248131 (patch) | |
tree | 255657cb67c48adb4b2bc4d5f43a7452033c142a /Bugzilla/WebService | |
parent | 6450f192749c0bd05a5b9364557f2c7c06db82c6 (diff) | |
download | bugzilla-93389e6f6ac484df747bf8ae6ab209e561248131.tar.gz bugzilla-93389e6f6ac484df747bf8ae6ab209e561248131.tar.xz |
Bug 916889: Bug.attachment webservice calls should return the size of the attachment
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r-- | Bugzilla/WebService/Bug.pm | 8 |
1 files changed, 8 insertions, 0 deletions
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<base64> The raw data of the attachment, encoded as Base64. +=item C<size> + +C<int> The length (in bytes) of the attachment. + =item C<creation_time> C<dateTime> The time the attachment was created. |