mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
feature 2616: HTML5 upload (with plupload 2.1.2). First basic implementation. Needs customization.
Chunked upload + Drag & drop (no more Flash) use a new specific API method pwg.images.upload git-svn-id: http://piwigo.org/svn/trunk@28545 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -464,6 +464,30 @@ function ws_addDefaultMethods( $arr )
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
||||
$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',
|
||||
|
||||
Reference in New Issue
Block a user