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;
if(\App::$data['api_info'] && array_key_exists('media',$_FILES)) {
if($_REQUEST['api_source'] && array_key_exists('media',$_FILES)) {
$using_api = true;
}

View file

@ -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

View file

@ -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();