My backend - PHP Laravel
*I have tried fetch API with content type image/png. But when i tried to pull this media at backend i got null.
*Do we have any base64 or any other conversion on media? so that i can pass encoded data instead of raw file
*Or i could try first uploading at wix media afterwards pass that file path to my server and get media content and upload it in my server but if i use this method how could i delete media from wix after i upload it to my server?
My sample code:
fetch('http://www.server.net', {
method: 'POST',
headers: {
"Content-Type": "image/png"
},
body: file //$w("#file").value[0]
}).then(
response => response.json()
).then(
success => console.log(success)
).catch(
error => console.log(error)
);