diff options
-rw-r--r-- | Zotlabs/Module/Wall_attach.php | 2 | ||||
-rw-r--r-- | doc/api_item_store.md | 14 | ||||
-rw-r--r-- | include/api_zot.php | 7 |
3 files changed, 17 insertions, 6 deletions
diff --git a/Zotlabs/Module/Wall_attach.php b/Zotlabs/Module/Wall_attach.php index 9268fbb0a..c6fe7518e 100644 --- a/Zotlabs/Module/Wall_attach.php +++ b/Zotlabs/Module/Wall_attach.php @@ -12,7 +12,7 @@ class Wall_attach extends \Zotlabs\Web\Controller { $using_api = false; - if(\App::$data['api_info'] && array_key_exists('media',$_FILES)) { + if($_REQUEST['api_source'] && array_key_exists('media',$_FILES)) { $using_api = true; } diff --git a/doc/api_item_store.md b/doc/api_item_store.md index 0748c266f..26b6db121 100644 --- a/doc/api_item_store.md +++ b/doc/api_item_store.md @@ -16,11 +16,23 @@ Required: Optional: - $_FILES['media'] - uploaded media file (currently photos) + uploaded media file to include with post - title title of post/item +- contact_allow + array of xchan.xchan_hash allowed to view this item + +- group_allow + array of group.hash allowed to view this item + +- contact_deny + array of xchan.xchan_hash not allowed to view this item + +- group_deny + array of group.hash not allowed to view this item + - coord geographic coordinates diff --git a/include/api_zot.php b/include/api_zot.php index 8d6041408..2bbae244c 100644 --- a/include/api_zot.php +++ b/include/api_zot.php @@ -360,11 +360,10 @@ if(x($_FILES,'media')) { $_FILES['userfile'] = $_FILES['media']; // upload the image if we have one - $_REQUEST['silent']='1'; //tell wall_upload function to return img info instead of echo - $mod = new Zotlabs\Module\Wall_upload(); + $mod = new Zotlabs\Module\Wall_attach(); $media = $mod->post(); - if(strlen($media)>0) - $_REQUEST['body'] .= "\n\n".$media; + if($media) + $_REQUEST['body'] .= "\n\n" . $media; } $mod = new Zotlabs\Module\Item(); |