fixes #2353 update images with upload form (#2385)

Add a mode to update photos with the upload form. Modify the upload formats form, so that it will update the photo with the same file extension.
This commit is contained in:
Perrom
2025-07-31 10:41:01 +02:00
committed by GitHub
parent bc4acec569
commit d0ac05d951
9 changed files with 385 additions and 38 deletions

6
ws.php
View File

@@ -262,7 +262,6 @@ function ws_addDefaultMethods( $arr )
'pwg.images.formats.searchImage',
'ws_images_formats_searchImage',
array(
'category_id' => array('type'=>WS_TYPE_ID, 'default'=>null),
'filename_list' => array(),
),
'Search for image ids matching the provided filenames. <b>filename_list</b> must be a JSON encoded associative array of unique_id:filename.<br><br>The method returns a list of unique_id:image_id.',
@@ -500,6 +499,11 @@ function ws_addDefaultMethods( $arr )
'type' => WS_TYPE_ID,
'info' => 'id of the extended image (name/category/level are not used if format_of is provided)',
),
'update_mode' => array(
'default' => false,
'type' => WS_TYPE_BOOL,
'info' => 'true if the update mode is active',
),
'pwg_token' => array(),
),
'Add an image.