diff options
Diffstat (limited to 'modules/watermark/controllers')
-rw-r--r-- | modules/watermark/controllers/admin_watermarks.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/watermark/controllers/admin_watermarks.php b/modules/watermark/controllers/admin_watermarks.php index 0652b13c..a2cafee0 100644 --- a/modules/watermark/controllers/admin_watermarks.php +++ b/modules/watermark/controllers/admin_watermarks.php @@ -125,6 +125,13 @@ class Admin_Watermarks_Controller extends Admin_Controller { // encode it now, it passes through cleanly. See ticket #797. json::reply(array("result" => "error", "html" => rawurlencode((string)$form))); } + + // Override the application/json mime type. The dialog based HTML uploader uses an iframe to + // buffer the reply, and on some browsers (Firefox 3.6) it does not know what to do with the + // JSON that it gets back so it puts up a dialog asking the user what to do with it. So force + // the encoding type back to HTML for the iframe. + // See: http://jquery.malsup.com/form/#file-upload + header("Content-Type: text/html; charset=" . Kohana::CHARSET); } private function _update_graphics_rules() { |