Compress large attachments after the fact

I’d like to write a perl script to go through the RT database and
replace large file attachments with compressed versions of the same.
Just in case: as anybody done this already? Presumably a filename field
and a mime type field will need to be changed, in addition to the
content of the attachment …

Thanks,
Kevin Murphy

I’d like to write a perl script to go through the RT database and
replace large file attachments with compressed versions of the same.
Just in case: as anybody done this already? Presumably a filename field
and a mime type field will need to be changed, in addition to the
content of the attachment …

Have a look at how we handle base64 encoding attachments for Postgres. I
bet you could implement a gzip handler that worked the same. Then you’d
just have to update the content-encoding field and add encoder/decoders.
If you get the encoder/decoder stuff working, I’d love to see it. (And
really, a flag for "gzip non-text attachments over n kilobytes on
insert) would be very cool in core.

I’d like to write a perl script to go through the RT database and
replace large file attachments with compressed versions of the same.
Just in case: as anybody done this already? Presumably a filename field
and a mime type field will need to be changed, in addition to the
content of the attachment …
I sent to the lists patch that autozip attached files if size is
bigger then XXX. It was two years ago and against 3.0.x, but I don’t
maintain that patch anymore.

Thanks,
Kevin Murphy


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Download a free sample chapter of RT Essentials from O’Reilly Media at http://rtbook.bestpractical.com

WE’RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
San Francisco - Find out more at http://bestpractical.com/services/training.html

Best regards, Ruslan.

Hi there!

Finally I got it all bundled again so rt can be easily installed on
RHEL4/CentOS4.

More info at: Request Tracker Wiki

Regards,

Paulo Matos

|Sys & Net Admin | Centro de Inform�tica |
|Faculdade de Ci�ncias e Tecnologia | Tel: +351-21-2948596 |
|Universidade Nova de Lisboa | Fax: +351-21-2948548 |
|P-2829-516 Caparica | e-Mail: pjsm@fct.unl.pt |


Hi there!

Well, just several hours after I released 3.4.4, Jesse got 3.4.5
out. This time I got the train… now enjoy.

WARNING: This packages were built on the assumption that selinux
is turned off.

More info at: Request Tracker Wiki

Regards,

Paulo Matos

|Sys & Net Admin | Centro de Inform�tica |
|Faculdade de Ci�ncias e Tecnologia | Tel: +351-21-2948596 |
|Universidade Nova de Lisboa | Fax: +351-21-2948548 |
|P-2829-516 Caparica | e-Mail: pjsm@fct.unl.pt |


Hi Paul!

Thanks for the RPM.
I tried it on RHEL4.
But I have a litte problem with it…
I get an error when initialize the database if I set following option in SiteConfig:

@LexiconLanguages = qw(en) unless (@LexiconLanguages);

The error is:

Use of uninitialized value in -e at /usr/lib/perl5/site_perl/5.8.5/Locale/Maketext/Lexicon.pm line 364.
cannot find /opt/rt3/local/po/en.po (called by RT::I18N) in @INC at /usr/lib/perl5/site_perl/5.8.5/Locale/Maketext/Lexicon.pm line 364.

I tried to update Locale::Maketext::Lexicon but got this error:

next at /home/rtusr/lib/perl5/site_perl/5.8.5/Locale/Maketext/Lexicon.pm line 427

Now I set languages back to * and it worked.
But it whould be fine if it whould work…
What do you think about?

Regards,

Samuel-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Paulo Matos
Sent: Friday,13 January,2006 06:11
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Announce: rt-3.4.5 rpms for RHEL4/CentOS4 are out!!

Hi there!

Well, just several hours after I released 3.4.4, Jesse got 3.4.5 out. This time I got the train… now enjoy.

WARNING: This packages were built on the assumption that selinux is turned off.

More info at: Request Tracker Wiki

Regards,

Paulo Matos

|Sys & Net Admin | Centro de Informática |
|Faculdade de Ciências e Tecnologia | Tel: +351-21-2948596 |
|Universidade Nova de Lisboa | Fax: +351-21-2948548 |
|P-2829-516 Caparica | e-Mail: pjsm@fct.unl.pt |


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Download a free sample chapter of RT Essentials from O’Reilly Media at http://rtbook.bestpractical.com

WE’RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and San Francisco - Find out more at http://bestpractical.com/services/training.html