more api work for item/store and doco

This commit is contained in:
zotlabs 2016-12-02 23:09:25 -08:00
parent 23acd2738b
commit 8e6ff32c97
3 changed files with 17 additions and 6 deletions

View File

@ -12,7 +12,7 @@ class Wall_attach extends \Zotlabs\Web\Controller {
$using_api = false; $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; $using_api = true;
} }

View File

@ -16,11 +16,23 @@ Required:
Optional: Optional:
- $_FILES['media'] - $_FILES['media']
uploaded media file (currently photos) uploaded media file to include with post
- title - title
title of post/item 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 - coord
geographic coordinates geographic coordinates

View File

@ -360,11 +360,10 @@
if(x($_FILES,'media')) { if(x($_FILES,'media')) {
$_FILES['userfile'] = $_FILES['media']; $_FILES['userfile'] = $_FILES['media'];
// upload the image if we have one // 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_attach();
$mod = new Zotlabs\Module\Wall_upload();
$media = $mod->post(); $media = $mod->post();
if(strlen($media)>0) if($media)
$_REQUEST['body'] .= "\n\n".$media; $_REQUEST['body'] .= "\n\n" . $media;
} }
$mod = new Zotlabs\Module\Item(); $mod = new Zotlabs\Module\Item();