aboutsummaryrefslogtreecommitdiffstats
path: root/ws.php
diff options
context:
space:
mode:
Diffstat (limited to 'ws.php')
-rw-r--r--ws.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/ws.php b/ws.php
index c5829671b..69084e3b0 100644
--- a/ws.php
+++ b/ws.php
@@ -465,6 +465,30 @@ function ws_addDefaultMethods( $arr )
);
$service->addMethod(
+ 'pwg.images.upload',
+ 'ws_images_upload',
+ array(
+ 'name' => array('default' => null),
+ 'category' => array(
+ 'default'=>null,
+ 'flags'=>WS_PARAM_FORCE_ARRAY,
+ 'type'=>WS_TYPE_ID
+ ),
+ 'level' => array(
+ 'default' => 0,
+ 'maxValue' => max($conf['available_permission_levels']),
+ 'type' => WS_TYPE_INT|WS_TYPE_POSITIVE
+ ),
+ 'pwg_token' => array(),
+ ),
+ 'Add an image.
+<br>Use the <b>$_FILES[image]</b> field for uploading file.
+<br>Set the form encoding to "form-data".',
+ $ws_functions_root . 'pwg.images.php',
+ array('admin_only'=>true, 'post_only'=>true)
+ );
+
+ $service->addMethod(
'pwg.images.delete',
'ws_images_delete',
array(