In my app, I want to implement the following:
1. Insert a File chooser and a sprite plugins. (ok)
2. Add event: (ok)
condition: FileChooser On changed
action: sprite Load image from FileChooser.FileURLAt(0)
3. upload the above local image to the server. (I don't know how to do it.)
I think I should use the AJAX to call a serverside php, but what's the parameter I should write?
Thanks a lot.
1. Refer to https://www.scirra.com/forum/ajax-image-request-troubles_t112942?&hilit=save+image+to+server&start=10, use Pode's ExtractImage plugin to convert the image to a base64 string.
2. Refer to https://www.scirra.com/forum/viewtopic.php?f=147&t=92690&p=723457&hilit=save+image+to+server#p723457, write your own PHP script.
3. Pass the base64 string to PHP script by AJAX plugin's action Post to URL.
Thank you, angellondon, Pode, GameThirsty, and all.