mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
more api work for item/store and doco
This commit is contained in:
parent
23acd2738b
commit
8e6ff32c97
3 changed files with 17 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue