wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[ljcom] r10366: LJSUP-8540. Wrong mime-type saved for vg...

Committer: gprochaev
LJSUP-8540. Wrong mime-type saved for vgifts

U   trunk/htdocs/admin/vgift/edit.bml
Modified: trunk/htdocs/admin/vgift/edit.bml
===================================================================
--- trunk/htdocs/admin/vgift/edit.bml	2011-04-08 09:13:02 UTC (rev 10365)
+++ trunk/htdocs/admin/vgift/edit.bml	2011-04-08 09:38:56 UTC (rev 10366)
@@ -91,7 +91,7 @@
         ## Set large image
         if ($POST{'vgift_content_large'}) {
             $content_length = bytes::length($POST{'vgift_content_large'});
-            $magic = substr $POST{'vgift_content_large'}, 0, 20;
+            $magic = substr $large_file_content, 0, 20;
             $mime_type = format_magic($magic)
                 or die "Unknown format for upload";
             $result_l = LJ::FileStore->save_file(path => "/vgift/" . $vgift->id . "/large", content => $large_file_content, mime_type => $mime_type, content_length => $content_length);
@@ -100,7 +100,7 @@
         ## Set small image
         if ($POST{'vgift_content_small'}) {
             $content_length = bytes::length($POST{'vgift_content_small'});
-            $magic = substr $POST{'vgift_content_small'}, 0, 20;
+            $magic = substr $small_file_content, 0, 20;
             $mime_type = format_magic($magic)
                 or die "Unknown format for upload";
             $result_s = LJ::FileStore->save_file(path => "/vgift/" . $vgift->id . "/small", content => $small_file_content, mime_type => $mime_type, content_length => $content_length);

Tags: bml, ljcom, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments