Changes

Jump to navigation Jump to search
1,058 bytes removed ,  14:19, 29 October 2016
Line 1,949: Line 1,949:  
==== If there was an issue ====
 
==== If there was an issue ====
 
<pre></pre>
 
<pre></pre>
  −
=== Posting photos for a product ===
  −
* Use the POST method on /cgi/product_image_upload.pl
  −
** code: the barcode
  −
** imagefield: (front | ingredients | nutrition)
  −
** imgupload_front : your image file if imagefield:front
  −
** imgupload_ingredients: your image file if imagefield:ingredients
  −
** imgupload_nutrition: your image file if imagefield:nutrition
  −
  −
'''Important:'''
  −
* There must be a HTTP header "Content-Type: multipart/form-data" in the HTTP POST request.
  −
* The imageupload_(front|ingredients|nutrition) name, size and data needs to be encoded in the multipart/form-data format, usually your HTTP request library will do that for you.
  −
* All parameters need to be passed as POST parameters, do not put some in the URL.
  −
* 0048151623426 is a random barcode used only for demonstration purposes.
  −
  −
Example: <sup>(remember to do tests on world.openfoodfacts.net - login and password: off )</sup>
  −
<pre>
  −
http://world.openfoodfacts.org/cgi/product_image_upload.pl
  −
</pre>
  −
<pre>
  −
http://world.openfoodfacts.net/cgi/product_image_upload.pl?code=0048151623426
  −
</pre>
      
=== Manipulating photos for a product ===
 
=== Manipulating photos for a product ===

Navigation menu