mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 08:15:13 +00:00
minor optimisation
This commit is contained in:
parent
77f71303f2
commit
fd5c92822c
1 changed files with 2 additions and 5 deletions
|
@ -2,10 +2,8 @@
|
||||||
namespace Zotlabs\Module;
|
namespace Zotlabs\Module;
|
||||||
|
|
||||||
require_once('include/attach.php');
|
require_once('include/attach.php');
|
||||||
require_once('include/channel.php');
|
|
||||||
require_once('include/photos.php');
|
require_once('include/photos.php');
|
||||||
|
|
||||||
|
|
||||||
class Wall_attach extends \Zotlabs\Web\Controller {
|
class Wall_attach extends \Zotlabs\Web\Controller {
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
|
@ -56,6 +54,8 @@ class Wall_attach extends \Zotlabs\Web\Controller {
|
||||||
json_return_and_die($result);
|
json_return_and_die($result);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
header('Range: bytes=0-' . (($x['size']) ? $x['size'] - 1 : 0));
|
||||||
|
|
||||||
$_FILES['userfile'] = [
|
$_FILES['userfile'] = [
|
||||||
'name' => $x['name'],
|
'name' => $x['name'],
|
||||||
'type' => $x['type'],
|
'type' => $x['type'],
|
||||||
|
@ -100,9 +100,6 @@ class Wall_attach extends \Zotlabs\Web\Controller {
|
||||||
if($using_api)
|
if($using_api)
|
||||||
return $s;
|
return $s;
|
||||||
|
|
||||||
|
|
||||||
if($partial)
|
|
||||||
header('Range: bytes=0-' . (($x['length']) ? $x['length'] - 1 : 0));
|
|
||||||
$result['message'] = $s;
|
$result['message'] = $s;
|
||||||
json_return_and_die($result);
|
json_return_and_die($result);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue