This sample works perfect but needs some setup:
- DataUpload.java file have to be in the same folder than the .pde file.
- In line 52 of the file DataUpload.java you have to setup de adress of the Upload.php in the Webserver. In line 44 you can also define the folder where the images will be upload.
- In Processing 3 there is a error when running imageUpload.pde in line 153, to solve this just delete from line 148 to 154.
- The Upload.php needs also to setup the destination folder
” */ reference link: https://forum.processing.org/two/discussion/18383/upload-image-to-webserver