[rt-users] Help with scrip for Custom Field

Kenneth Crocker kfcrocker at lbl.gov
Mon Aug 8 12:23:03 EDT 2011


Kevin,

I don't understand the term "limitdown", but I'll try to create a loop. Am I
correct with the code
"Attachments->First->ContentType(Value => 'image/gif')" and should that be
the main condition in the loop (got an example)?

Thanks.

Kenn
LBNL

On Mon, Aug 8, 2011 at 7:43 AM, Kevin Falcone <falcone at bestpractical.com>wrote:

> On Fri, Aug 05, 2011 at 03:18:54PM -0700, Kenneth Crocker wrote:
> >    To all,
> >
> >    I have a Custom Field with the type=Upload multiple images. I want to
> put in an attachment
> >    (gif or jpeg) from an email.
> >    The scrip I have written uses this to get the pic:
> >
> >    my $trans = $self->TransactionObj;
> >    my $pic = $trans->Attachments->First->ContentType(Value =>
> 'image/gif'); (this 'gif' variation
> >    was merely to try the concept. I can try variations for jpeg later).
> >
> >    The result was no pic uploaded and next to the CF name (on the ticket
> display) was
> >    'multipart/mixed'.
> >
> >    Inside the Update screen, these was the name of the CF followed by a
> checkbox and the
> >    'multipart/mixed'.
> >
> >    Obviously I'm missing something. I went to Attachments_Overlay.txt and
> didn't really see
> >    anything that helped (obviously - duh).
>
> Kenn
>
> Your code gets the first attachment and then calls the ContentType
> method on it (which takes no arguments) and that returns the
> Content-Type of multipart/mixed, which is expected.
>
> You need to loop through the attachments and get your gif (or just
> Limit down).
>
> -kevin
>
>
>
> --------
> 2011 Training: http://bestpractical.com/services/training.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110808/7a3b41fd/attachment.htm>


More information about the rt-users mailing list