work in progress [might break]
This commit is contained in:
parent
86d1102872
commit
1832cd18fe
|
@ -24,8 +24,13 @@ AFRAME.registerComponent('paste', {
|
||||||
.then( (base64) => {
|
.then( (base64) => {
|
||||||
let mimetype = base64.replace(/;base64,.*/,'')
|
let mimetype = base64.replace(/;base64,.*/,'')
|
||||||
console.log(base64.substr(0,100))
|
console.log(base64.substr(0,100))
|
||||||
//let base64str = base64.replace(/.*;base64,/,'')
|
let data = base64.replace(/.*;base64,/,'')
|
||||||
alert(`\nYES!\n\n${mimetype} file received!\n\n(TODO: render it)`)
|
if( data.match(/<a-/) ){
|
||||||
|
let el = document.createElement('a-entity')
|
||||||
|
el.innerHTML = data
|
||||||
|
AFRAME.scenes[0].appendChild(el)
|
||||||
|
console.log(data)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue