I have over-ridden the built in Save button on the editor so I could put in some changes before I submit the data to the server. However, when I try and use FormData and fetch to POST the data to $_FILES the payload never reaches the server. When I checked the Networking tab I can see the payload ready to go but nothing happens to it. When I view the $_FILES content on the server I see
Array( [imageEditor_upload] => Array with the array fields all empty except [error]=>4 and [size]=>0
I tried creating my own FormData and appending the blob file in a variety of different ways but that does not appear to work.
What I am looking for is a way to upload the edited image to the server so I can access the tmp file and store the jpg file with my own filename and location. Is there a default button that will do that? I am not looking to download anything with the button as the default Save does.
Edit:
I think I found the problem. I am now able to populate my
formData Array ($_FILES) with the correct data and it is showing in the
Network Tab response page with all the proper fields. I now just need
to access that in PHP to save my files and update my DB. one small step
at a time...
Edit2:
Yes, I was able to utilize formData and $_FILES to upload the info to the server and then save the file to my upload directory. I believe i had a typo originally which was then not filling in my $_FILES array and I then needed to store some additional information in my sessions array to access the original info.
Its is now working as expected.