From a25730da0b3ef9ea4e99af4e0d99117a81a9b8ed Mon Sep 17 00:00:00 2001 From: Reed Loden Date: Fri, 30 Dec 2011 15:31:19 -0800 Subject: Bug 647662 - Add a "size" return value to Bug.attachments [r=dkl r=mkanat a=mkanat] --- Bugzilla/WebService/Bug.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Bugzilla/WebService') diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 9a67f2304..415681678 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -933,6 +933,10 @@ sub _attachment_to_hash { $item->{'data'} = $self->type('base64', $attach->data); } + if (filter_wants $filters, 'size') { + $item->{'size'} = $self->type('int', $attach->datasize); + } + return $item; } @@ -1286,6 +1290,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. @@ -1373,6 +1381,8 @@ C. =item In Bugzilla B<4.2>, the C return value was removed (this attribute no longer exists for attachments). +=item The C return value was added in Bugzilla B<5.0>. + =back =back -- cgit v1.2.3-24-g4f1b