diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2015-03-03 17:52:05 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2015-10-06 09:09:23 +0100 |
commit | 597019d4fc28d160588d137ac58d948393f26af2 (patch) | |
tree | a35d552f83b962bc7b54ac0f3f5cb113251f2795 /perllib/FixMyStreet/App/Model/PhotoSet.pm | |
parent | 014d2a4342d1dbe7d2987376974b20116439e07d (diff) |
Allow attachment of emails in email_send
Required by Zurich for mysociety/FixMyStreet-Commercial#675
Diffstat (limited to 'perllib/FixMyStreet/App/Model/PhotoSet.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Model/PhotoSet.pm | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Model/PhotoSet.pm b/perllib/FixMyStreet/App/Model/PhotoSet.pm index fa6eb060b..5d75b62dc 100644 --- a/perllib/FixMyStreet/App/Model/PhotoSet.pm +++ b/perllib/FixMyStreet/App/Model/PhotoSet.pm @@ -71,7 +71,25 @@ sub _jpeg_magic { # and \x{49}\x{49} (Tiff, 3 results in live DB) ? } -has images => ( # jpeg data for actual image +=head2 C<images>, C<num_images>, C<get_raw_image_data>, C<all_images> + +C<$photoset-E<GT>images> is an AoA containing the filed and the binary image data. + + [ + [ $fileid1, $binary_data ], + [ $fileid2, $binary_data ], + ... + ] + +Various accessors are provided onto it: + + num_images: count + get_raw_image_data ($index): return the [$fileid, $binary_data] tuple + all_images: return AoA as an array (e.g. rather than arrayref) + +=cut + +has images => ( # AoA of [$fileid, $binary_data] tuples isa => 'ArrayRef', is => 'rw', traits => ['Array'], |