summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/data_rest.php
diff options
context:
space:
mode:
authormamouneyya <mamoun.diraneyya@gmail.com>2010-09-29 22:01:36 +0300
committermamouneyya <mamoun.diraneyya@gmail.com>2010-09-29 22:01:36 +0300
commit6aabab4b715ff8ac00cc667e9d0a40c9868410d8 (patch)
tree85766ce290f3a89b1039969ce31bc47138d76594 /modules/gallery/helpers/data_rest.php
parent61e55becf46ce899632bff7ce26a7208094618f0 (diff)
parentef8751468b998baddbc6d5827a392ed6e12e5548 (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.php7
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.