editor: borrar código usando createObjectURL

está deprecado por Chrome y de todas formas hay cosas que no funcionaban
por el content policy. hay algunos lugares en los que se podría arreglar
(con MediaStream) pero IMO no tiene sentido
This commit is contained in:
void 2021-02-02 17:44:10 +00:00
parent 8887932bee
commit 0c844a5c94

View file

@ -259,7 +259,6 @@ const typesWithProperties = {
const file = imgFileEl.files[0] const file = imgFileEl.files[0]
imgEl.src = URL.createObjectURL(file)
imgEl.dataset.editorLoading = true imgEl.dataset.editorLoading = true
uploadFile(file) uploadFile(file)
.then(url => { .then(url => {
@ -321,7 +320,6 @@ const typesWithProperties = {
const audioEl = figureEl.querySelector('audio') const audioEl = figureEl.querySelector('audio')
audioEl.src = URL.createObjectURL(file)
audioEl.dataset.editorLoading = true audioEl.dataset.editorLoading = true
uploadFile(file) uploadFile(file)
.then(url => { .then(url => {
@ -361,7 +359,6 @@ const typesWithProperties = {
const file = videoFileEl.files[0] const file = videoFileEl.files[0]
videoEl.poster = "" videoEl.poster = ""
videoEl.src = URL.createObjectURL(file)
videoEl.dataset.editorLoading = true videoEl.dataset.editorLoading = true
uploadFile(file) uploadFile(file)
.then(url => { .then(url => {
@ -401,7 +398,6 @@ const typesWithProperties = {
const file = pdfFileEl.files[0] const file = pdfFileEl.files[0]
const pdfEl = figureEl.children[0] const pdfEl = figureEl.children[0]
pdfEl.src = URL.createObjectURL(file)
pdfEl.dataset.editorLoading = true pdfEl.dataset.editorLoading = true
uploadFile(file) uploadFile(file)
.then(url => { .then(url => {