Differences

This shows you the differences between two versions of the page.

Link to this comparison view

dev:webapi:pwg.images.add [2015/01/07 15:08]
plg updated for Piwigo 2.4+ (only file is usefule, not high/thumb)
dev:webapi:pwg.images.add [2015/01/07 15:38] (current)
plg typo fixed
Line 26: Line 26:
 ==== Parameters ==== ==== Parameters ====
  
-  * //file_sum// : md5sum of the "web resized" photo +  * //original_sum// : md5sum that makes the photo unique
-  * //original_sum// : md5sum that makes the photo unique, identical to file_sum+
   * //categories// : list of category identifiers where you want the photo to be shown. Optionnaly, you can set a rank inside the  each category. Example : "19,3;16,0;134" will associate the photo to category 19 at rank 3, to category 16 at rank 0 (first position) and to category 134 with an automatic rank (last position).   * //categories// : list of category identifiers where you want the photo to be shown. Optionnaly, you can set a rank inside the  each category. Example : "19,3;16,0;134" will associate the photo to category 19 at rank 3, to category 16 at rank 0 (first position) and to category 134 with an automatic rank (last position).
 +  * (optional) //original_filename//
   * (optional) //name//   * (optional) //name//
   * (optional) //author//   * (optional) //author//
Line 35: Line 35:
   * (optional) //tag_ids// : list of tag numeric identifiers, separated with commas. Example "23,31,18" will associate the photo to tags 23, 31 and 18.   * (optional) //tag_ids// : list of tag numeric identifiers, separated with commas. Example "23,31,18" will associate the photo to tags 23, 31 and 18.
   * (optional) //level// : 0 (----), 1 (Contacts), 2 (Friends), 4 (Family), 8 (Admins)   * (optional) //level// : 0 (----), 1 (Contacts), 2 (Friends), 4 (Family), 8 (Admins)
 +  * (optional) //check_uniqueness// : check if file already exists (based on filename or md5sum, see $conf['uniqueness_mode'] in include/config_default.inc.php)
 +  * (optional) //image_id// : give an image_id if you want to update an existing photo
 +  * (deprecated) //high_sum//
 +  * (deprecated) //thumbnail_sum//
  
 ===== Examples ===== ===== Examples =====
Line 109: Line 113:
     original_sum => $original_sum,     original_sum => $original_sum,
 ); );
-$form->{file_sum} = file_md5_hex($opt{file}); 
  
 foreach my $key (keys %{ $opt{define} }) { foreach my $key (keys %{ $opt{define} }) {
 
Back to top
dev/webapi/pwg.images.add.1420643283.txt.gz · Last modified: 2015/01/07 15:08 by plg
 
 
github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact