}
const ext = name.split('.').slice(-1)[0].toLowerCase()
let tag;
if (ext in image_types) {
tag =
} else if (ext in audio_types) {
tag =
} else if (ext in video_types) {
tag =
} else {
tag =
{ab2str(buf)}
}
return (
{tag}
)
}
const getURLFor = (buf, type) => {
const arrayBufferView = new Uint8Array(buf)
const blob = new Blob([arrayBufferView], { type })
const urlCreator = window.URL || window.webkitURL
return urlCreator.createObjectURL(blob)
}
const ab2str = buf => String.fromCharCode.apply(null, new Uint8Array(buf))