aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-07-13 22:29:15 -0700
committerzotlabs <mike@macgirvin.com>2017-07-13 22:29:15 -0700
commitfd5c92822c2ff8f51df1d8e9117d5f5c5ea74bd9 (patch)
tree9a8ea1531aed61042b60244f192c70c4e049a945 /Zotlabs
parent77f71303f21e7690f75c33f54dc84033921102aa (diff)
downloadvolse-hubzilla-fd5c92822c2ff8f51df1d8e9117d5f5c5ea74bd9.tar.gz
volse-hubzilla-fd5c92822c2ff8f51df1d8e9117d5f5c5ea74bd9.tar.bz2
volse-hubzilla-fd5c92822c2ff8f51df1d8e9117d5f5c5ea74bd9.zip
minor optimisation
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Wall_attach.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/Zotlabs/Module/Wall_attach.php b/Zotlabs/Module/Wall_attach.php
index 5b3768da9..03d4cb37b 100644
--- a/Zotlabs/Module/Wall_attach.php
+++ b/Zotlabs/Module/Wall_attach.php
@@ -2,10 +2,8 @@
namespace Zotlabs\Module;
require_once('include/attach.php');
-require_once('include/channel.php');
require_once('include/photos.php');
-
class Wall_attach extends \Zotlabs\Web\Controller {
function init() {
@@ -56,6 +54,8 @@ class Wall_attach extends \Zotlabs\Web\Controller {
json_return_and_die($result);
}
else {
+ header('Range: bytes=0-' . (($x['size']) ? $x['size'] - 1 : 0));
+
$_FILES['userfile'] = [
'name' => $x['name'],
'type' => $x['type'],
@@ -100,9 +100,6 @@ class Wall_attach extends \Zotlabs\Web\Controller {
if($using_api)
return $s;
-
- if($partial)
- header('Range: bytes=0-' . (($x['length']) ? $x['length'] - 1 : 0));
$result['message'] = $s;
json_return_and_die($result);