How to pass image data using Ajax to server side in backend magento 2?

By default Image data are not post using ajax. only plain data will be passed as Ajax post. if we need to pass image data using ajax we need to call ajax as below way,
Call jquery using requirejs way in backend template file,
Let’s create a simple example of the form,

We need to Use You FormData() object of Javascript to store our image data and using above way we can just send image data to server side using ajax.

2 Replies to “How to pass image data using Ajax to server side in backend magento 2?”

Leave a Reply

Your email address will not be published. Required fields are marked *