aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-02 23:09:25 -0800
committerzotlabs <mike@macgirvin.com>2016-12-02 23:09:25 -0800
commit8e6ff32c97fe6abbbc93e3d7d2769142c285b948 (patch)
tree91c665eabf759ee99d0f9366ccf34a082394b5e3
parent23acd2738b7eca2c8d28c467d5e2baec7a6e9a36 (diff)
downloadvolse-hubzilla-8e6ff32c97fe6abbbc93e3d7d2769142c285b948.tar.gz
volse-hubzilla-8e6ff32c97fe6abbbc93e3d7d2769142c285b948.tar.bz2
volse-hubzilla-8e6ff32c97fe6abbbc93e3d7d2769142c285b948.zip
more api work for item/store and doco
-rw-r--r--Zotlabs/Module/Wall_attach.php2
-rw-r--r--doc/api_item_store.md14
-rw-r--r--include/api_zot.php7
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();