[rt-devel] attachments in RT

Carel Solomon carel.solomon at itouch.co.uk
Tue Aug 5 13:44:08 EDT 2003


Hi,

I'm modifying RT a bit so we can get some sort of a form interface going
where someone will fill in the boxes and a nice standard request will be
created (to avoid the "It doesn't work" descriptions some people use to
describe their issues in life). Now, some of these forms have attachments
(more than one). I've got the following in the HTML:

<tr>
    <td>Installation Instructions</td>
    <td><input type="file" name="InstallInstruct"></td>
</tr>

and:

<tr>
    <td>Backout Plan Document</td>
    <td><input type="file" name="BackoutDoc"></td>
</tr>

Now, having played with the Display file, there is a bit that creates a MIME
Object:

        my $MIMEObj = MakeMIMEEntity( Subject => $Subject,
                From => $ARGS{'From'},
                Cc => $Cc,
                Body => $TicketContent,
                AttachmentFieldName => 'InstallInstruct');


Now, having been desperate and adding hordes of lines to
lib/RT/Interface/Web.pm, I eventually found out that the file new gets
attached, because the variable either does not exist, or is empty by the
time it reaches Web.pm. This is probably more a Mason question than RT, but
I was hoping someone could give me pointer to:

A) Why the $ARGS{InstallInstruct} has na value by the time it gets to the
sub MakeMIMEEntity routine. And,
B) Any suggestions how I can have two files attached in one go? Should I
just repeat the my $MIMEObj = MakeMIMEEntity, my %create_args = and
$Ticket->Modify bits and insert $id value after it was created with the
first go?

Thanks
Carel

THIS E-MAIL AND ANY ATTACHMENTS MAY CONTAIN INFORMATION THAT IS CONFIDENTIAL
AND/OR LEGALLY PRIVILEGED. IF YOU ARE NOT THE INTENDED RECIPIENT, PLEASE DO
NOT READ IT, DELETE IT IMMEDIATELY AND INFORM iTOUCH (UK) LIMITED BY REPLY
E-MAIL OR TELEPHONING +44 (0)20 7613 6000. This Email has been checked for
viruses but it is your responsibility to conduct your own virus checks on
all parts of it.



More information about the Rt-devel mailing list