summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService
diff options
context:
space:
mode:
authorReed Loden <reed@reedloden.com>2011-12-31 00:31:19 +0100
committerReed Loden <reed@reedloden.com>2011-12-31 00:31:19 +0100
commita25730da0b3ef9ea4e99af4e0d99117a81a9b8ed (patch)
treea588a55873f2ef8b6f32f008c326263519850cd3 /Bugzilla/WebService
parent21d5f6e14678d566dd381e14e5f23647235659a9 (diff)
downloadbugzilla-a25730da0b3ef9ea4e99af4e0d99117a81a9b8ed.tar.gz
bugzilla-a25730da0b3ef9ea4e99af4e0d99117a81a9b8ed.tar.xz
Bug 647662 - Add a "size" return value to Bug.attachments
[r=dkl r=mkanat a=mkanat]
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r--Bugzilla/WebService/Bug.pm10
1 files changed, 10 insertions, 0 deletions
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<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.
@@ -1373,6 +1381,8 @@ C<summary>.
=item In Bugzilla B<4.2>, the C<is_url> return value was removed
(this attribute no longer exists for attachments).
+=item The C<size> return value was added in Bugzilla B<5.0>.
+
=back
=back