diff options
author | mamouneyya <mamoun.diraneyya@gmail.com> | 2010-09-29 22:01:36 +0300 |
---|---|---|
committer | mamouneyya <mamoun.diraneyya@gmail.com> | 2010-09-29 22:01:36 +0300 |
commit | 6aabab4b715ff8ac00cc667e9d0a40c9868410d8 (patch) | |
tree | 85766ce290f3a89b1039969ce31bc47138d76594 /modules/gallery/helpers/data_rest.php | |
parent | 61e55becf46ce899632bff7ce26a7208094618f0 (diff) | |
parent | ef8751468b998baddbc6d5827a392ed6e12e5548 (diff) |
Merge remote branch 'gallery3/master'
Conflicts:
themes/admin_wind/css/screen.css
themes/wind/css/screen.css
Diffstat (limited to 'modules/gallery/helpers/data_rest.php')
-rw-r--r-- | modules/gallery/helpers/data_rest.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/gallery/helpers/data_rest.php b/modules/gallery/helpers/data_rest.php index 98c98894..791de9c0 100644 --- a/modules/gallery/helpers/data_rest.php +++ b/modules/gallery/helpers/data_rest.php @@ -72,7 +72,12 @@ class data_rest_Core { header("Content-Type: {$item->mime_type}"); } Kohana::close_buffers(false); - readfile($file); + + if (isset($p->encoding) && $p->encoding == "base64") { + print base64_encode(file_get_contents($file)); + } else { + readfile($file); + } // We must exit here to keep the regular REST framework reply code from adding more bytes on // at the end or tinkering with headers. |