Thanks for the suggestions.
It’s a serverconnect form:
<form id="form1" method="post" is="dmx-serverconnect-form" action="dmxConnect/api/uploadaction.php" dmx-param:receiver="" dmx-on:upload="notifies1.success('uploaded')">
The form gets triggered by a flow (that is triggered by a (non-submit) button):
<script is="dmx-flow" id="add_tap" type="text/dmx-flow">[
{ runJS: {function: "canvastoimg", name: "canvastoimg"} },
{ run: {action: "{{form1.submit(true)}}", name: "submit"} }
]
</script>
In the JS (canvastoimg) I include a blob process:
canvas.toBlob(function(blob) {
var newImg = document.createElement('img'),
url = URL.createObjectURL(blob);
var form = document.getElementById('form1');
form.dmxExtraData['file'] = blob;
}, 'image/jpeg', 0.80
);
}
Could it be that the getElementById
triggers the form? Or the dmxExtraData
(couldnt’ find any documentation on this one)?