Custom save button to send blob to server

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.


1 Reply

DG Durga Gopalakrishnan Syncfusion Team October 28, 2025 09:47 AM UTC

Hi Kim,


Greetings from Syncfusion.


Thank you for the detailed update!


We are glad to hear, you were able to identify the issue and get the upload working as expected. We also have the documentation for opening an image from Blob and saving the image as Blob.


https://ej2.syncfusion.com/documentation/image-editor/open-save#open-an-image-from-blob-storage

https://ej2.syncfusion.com/documentation/image-editor/open-save#save-the-image-as-blob


Let us know if you have any further questions.


Regards,

Durga Gopalakrishnan.


Loader.
Up arrow icon