Fix posting pictures
This commit is contained in:
parent
6bd9c9f496
commit
e7e74819a3
1 changed files with 4 additions and 4 deletions
|
@ -56,7 +56,7 @@ class Update extends BaseApi
|
||||||
'in_reply_to_status_id' => 0,
|
'in_reply_to_status_id' => 0,
|
||||||
'lat' => 0,
|
'lat' => 0,
|
||||||
'long' => 0,
|
'long' => 0,
|
||||||
'media_ids' => [],
|
'media_ids' => '',
|
||||||
'source' => '',
|
'source' => '',
|
||||||
'include_entities' => false,
|
'include_entities' => false,
|
||||||
], $request);
|
], $request);
|
||||||
|
@ -127,9 +127,9 @@ class Update extends BaseApi
|
||||||
$item['object-type'] = Activity\ObjectType::NOTE;
|
$item['object-type'] = Activity\ObjectType::NOTE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ids = $request['media_ids'];
|
if (!empty($_REQUEST['media_ids'])) {
|
||||||
|
$ids = explode(',', $_REQUEST['media_ids']);
|
||||||
if (!empty($_FILES['media'])) {
|
} elseif (!empty($_FILES['media'])) {
|
||||||
// upload the image if we have one
|
// upload the image if we have one
|
||||||
$picture = Photo::upload($uid, $_FILES['media']);
|
$picture = Photo::upload($uid, $_FILES['media']);
|
||||||
if (!empty($picture)) {
|
if (!empty($picture)) {
|
||||||
|
|
Loading…
Reference in a new issue