[Rt-commit] rt branch, 4.2/rest-content-disposition, created. rt-4.0.19-62-gb2d7d01

Alex Vandiver alexmv at bestpractical.com
Mon Mar 24 15:25:03 EDT 2014


The branch, 4.2/rest-content-disposition has been created
        at  b2d7d0187bdd540148c80166942616c7821fd877 (commit)

- Log -----------------------------------------------------------------
commit b2d7d0187bdd540148c80166942616c7821fd877
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Mar 24 15:24:57 2014 -0400

    Allow arbitrary Content-Disposition in REST uploads
    
    Fixes issues #19770

diff --git a/lib/RT/Interface/REST.pm b/lib/RT/Interface/REST.pm
index 17fe446..06d7f83 100644
--- a/lib/RT/Interface/REST.pm
+++ b/lib/RT/Interface/REST.pm
@@ -328,7 +328,7 @@ sub process_attachments {
             Path => $tmp_fn,
             Type => $info->{'Content-Type'} || guess_media_type($tmp_fn),
             Filename => $file,
-            Disposition => "attachment",
+            Disposition => $info->{'Content-Disposition'} || "attachment",
         );
         $new_entity->bodyhandle->{'_dirty_hack_to_save_a_ref_tmp_fh'} = $tmp_fh;
         $i++;

-----------------------------------------------------------------------


More information about the rt-commit mailing list