I have a website where you record a video, and what you do is create a BLOB and then send it to a URL server with URL.createObjectURL()
. But I need to save that BLOB in MySQL , so I tried to send the BLOB to input
of type file and then when I call it of < em> PHP remove it from there.
Code:
function makeLink()
{
let blob = new Blob(chunks, {type: media.type })
, url = URL.createObjectURL(blob)
, li = document.createElement('li')
, mt = document.createElement(media.tag)
, hf = document.createElement('a')
,contenedor=document.createElement('input')
li.setAttribute("id","li");
contenedor.setAttribute("id","video2");
contenedor.setAttribute("name","video2");
contenedor.setAttribute("type","file");
contenedor.setAttribute("value",chunks);
mt.controls = true;
mt.src = url;
hf.href = url;
}