Official Attachment Status

Hello,

After reading through the archives, I’m not entirely clear if
attachments are supposed to be working in the latest version (3.0.2).
Mine aren’t, so before I dig down to figure out what I did wrong, I was
wondering if we could get the official word. I’m running RH8,
apache2/modperl1.99 (everything else works great)

Thanks!

Art

After reading through the archives, I’m not entirely clear if
attachments are supposed to be working in the latest version (3.0.2).
Mine aren’t, so before I dig down to figure out what I did wrong, I was
wondering if we could get the official word. I’m running RH8,
apache2/modperl1.99 (everything else works great)
Art

Glad :slight_smile: to hear someone else is having the problem. I thought I was the
only one.

If anyone has a solution please do post.
Thanks
Nick

Hello,

After reading through the archives, I’m not entirely clear if
attachments are supposed to be working in the latest version (3.0.2).
Mine aren’t

Can you actually define ‘not working’?

http://www.bestpractical.com/rt – Trouble Ticketing. Free.

Jesse,
When I first posted, I defined the problem thus…

Put an attachment into rt3.0.0, and when you go to get it out, it comes as
encoded text that is corrupt - you can’t open it back up with the original
application (word, zip, whatever).

However, pull up an attachment from a ticket that was entered into the
system while it was rt2.0.9, and you can open the attachment! So it seems
there might be a problem with entering attachments into rt3.0.0? Since I
can retrieve attchmts that were put in while it was a 2.x system.

Thanks
NickOn Wed, May 14, 2003 at 10:14:55AM -0400, Art Morales wrote:

Hello,

After reading through the archives, I’m not entirely clear if
attachments are supposed to be working in the latest version (3.0.2).
Mine aren’t

Can you actually define ‘not working’?

Nicolae P. Costescu, Ph.D. / Senior Developer
Stronghold Technologies
46040 Center Oak Plaza, Suite 160 / Sterling, Va 20166
Tel: 571-434-1472 / Fax: 571-434-1478

Attachments appear to be there, but they are too small (thus corrupted).

Art-----Original Message-----
From: Jesse Vincent [mailto:jesse@bestpractical.com]
Sent: Wed 5/14/2003 8:28 PM
To: Art Morales
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] Official Attachment Status

On Wed, May 14, 2003 at 10:14:55AM -0400, Art Morales wrote:
>
> Hello,
>
> After reading through the archives, I'm not entirely clear if
> attachments are supposed to be working in the latest version (3.0.2).
> Mine aren't

Can you actually define 'not working'?


http://www.bestpractical.com/rt  -- Trouble Ticketing. Free.

Hello,

After reading through the archives, I’m not entirely clear if
attachments are supposed to be working in the latest version (3.0.2).
Mine aren’t, so before I dig down to figure out what I did wrong, I was
wondering if we could get the official word. I’m running RH8,
apache2/modperl1.99 (everything else works great)

Unicode-characters in WebUI’s “file attachments” has been fixed
here by the change below. Hadn’t tested it with the mail-gateway,
though.

Thanks,
/Autrijus/

Change 5860 by autrijus@ehrtest on 2003/05/15 12:00:25

* utf8 filenames in attachments is now ok.
* no longer attempts to convert web-attached textual parts into utf8, only the body.

Affected files …

… //depot/RT/rt/lib/RT/Attachment_Overlay.pm#18 edit
… //depot/RT/rt/lib/RT/Interface/Web.pm#50 edit

Differences …

==== //depot/RT/rt/lib/RT/Attachment_Overlay.pm#18 (text) ====

@@ -136,7 +136,10 @@
chomp($Subject);

 #Get the filename
  • my $Filename = $Attachment->head->recommended_filename;
  • my $Filename = $Attachment->head->recommended_filename || eval {

  • ${ $Attachment->head->{mail_hdr_hash}{‘Content-Disposition’}[0] }

  •   =~ /^.*\bfilename="(.*)"$/ ? $1 : ''
    
  • };

    if ( $Attachment->parts ) {
    $id = $self->SUPER::Create(

==== //depot/RT/rt/lib/RT/Interface/Web.pm#50 (text) ====

@@ -453,6 +453,8 @@
);
}

  • RT::I18N::SetMIMEEntityToUTF8($Message); # convert text parts into utf-8
    my $cgi_object = $m->cgi_object;

    if (my $filehandle = $cgi_object->upload( $args{‘AttachmentFieldName’} ) ) {
    @@ -478,10 +480,11 @@
    $filename = “$filehandle” unless defined($filename);

    $filename =~ s#^.*[\/]##;
    $Message->attach(
    Path => $temp_file,

  •    Filename => $filename,
    
  •    Type     => $uploadinfo->{'Content-Type'}
    
  •    Filename => Encode::decode_utf8($filename),
    
  •    Type     => $uploadinfo->{'Content-Type'},
    
    );
    close($fh);

@@ -490,7 +493,6 @@
}

 $Message->make_singlepart();
  • RT::I18N::SetMIMEEntityToUTF8($Message); # convert text parts into utf-8
    return ($Message);

}

Hi there,

I applied the fixes and I can indeed see attachments included through
the web interface, but not if they are sent by email and the mailgate…

Art-----Original Message-----
From: Autrijus Tang [mailto:autrijus@autrijus.org]
Sent: Thursday, May 15, 2003 8:26 AM
To: Art Morales
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] Official Attachment Status

On Wed, May 14, 2003 at 10:14:55AM -0400, Art Morales wrote:

Hello,

After reading through the archives, I’m not entirely clear if
attachments are supposed to be working in the latest version (3.0.2).
Mine aren’t, so before I dig down to figure out what I did wrong, I
was wondering if we could get the official word. I’m running RH8,
apache2/modperl1.99 (everything else works great)

Unicode-characters in WebUI’s “file attachments” has been fixed here by
the change below. Hadn’t tested it with the mail-gateway, though.

Thanks,
/Autrijus/

Change 5860 by autrijus@ehrtest on 2003/05/15 12:00:25

* utf8 filenames in attachments is now ok.
* no longer attempts to convert web-attached textual parts into

utf8, only the body.

Affected files …

… //depot/RT/rt/lib/RT/Attachment_Overlay.pm#18 edit
… //depot/RT/rt/lib/RT/Interface/Web.pm#50 edit

Differences …

==== //depot/RT/rt/lib/RT/Attachment_Overlay.pm#18 (text) ====

@@ -136,7 +136,10 @@
chomp($Subject);

 #Get the filename
  • my $Filename = $Attachment->head->recommended_filename;
  • my $Filename = $Attachment->head->recommended_filename || eval {

  • ${ $Attachment->head->{mail_hdr_hash}{‘Content-Disposition’}[0]
    }

  •   =~ /^.*\bfilename="(.*)"$/ ? $1 : ''
    
  • };

    if ( $Attachment->parts ) {
    $id = $self->SUPER::Create(

==== //depot/RT/rt/lib/RT/Interface/Web.pm#50 (text) ====

@@ -453,6 +453,8 @@
);
}

  • RT::I18N::SetMIMEEntityToUTF8($Message); # convert text parts into

  • utf-8
    my $cgi_object = $m->cgi_object;

    if (my $filehandle = $cgi_object->upload(
    $args{‘AttachmentFieldName’} ) ) { @@ -478,10 +480,11 @@
    $filename = “$filehandle” unless defined($filename);

    $filename =~ s#^.*[\/]##;
    $Message->attach(
    Path => $temp_file,

  •    Filename => $filename,
    
  •    Type     => $uploadinfo->{'Content-Type'}
    
  •    Filename => Encode::decode_utf8($filename),
    
  •    Type     => $uploadinfo->{'Content-Type'},
    
    );
    close($fh);

@@ -490,7 +493,6 @@
}

 $Message->make_singlepart();
  • RT::I18N::SetMIMEEntityToUTF8($Message); # convert text parts into
    utf-8
    return ($Message);

}