diff options
author | friendica <info@friendica.com> | 2013-02-05 15:34:30 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-02-05 15:34:30 -0800 |
commit | 05ba851d52019decf84ea0325f4138f354355d37 (patch) | |
tree | d216af35d724f07110da2f6298a9faa96aff85de /mod/attach.php | |
parent | 74d23fcf8c04accae3584824793004d0ab7ec1e6 (diff) | |
download | volse-hubzilla-05ba851d52019decf84ea0325f4138f354355d37.tar.gz volse-hubzilla-05ba851d52019decf84ea0325f4138f354355d37.tar.bz2 volse-hubzilla-05ba851d52019decf84ea0325f4138f354355d37.zip |
mod/attach support for files/attachments using OS storage
Diffstat (limited to 'mod/attach.php')
-rw-r--r-- | mod/attach.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mod/attach.php b/mod/attach.php index b94c02c19..a5f9d1a6b 100644 --- a/mod/attach.php +++ b/mod/attach.php @@ -19,7 +19,10 @@ function attach_init(&$a) { header('Content-type: ' . $r['data']['filetype']); header('Content-disposition: attachment; filename=' . $r['data']['filename']); - echo $r['data']['data']; + if($r['data']['flags'] & ATTACH_FLAG_OS ) + echo @file_get_contents($r['data']['data']); + else + echo $r['data']['data']; killme(); }
\ No newline at end of file |