UrlPlayer: start the chain with the url

This commit is contained in:
He4eT 2023-05-21 15:43:47 +03:00 committed by Alexey
commit dc22a4782f

View file

@ -17,14 +17,14 @@ const prepareVM = ({ url, setStatus, setParts }) => {
return args
}
const cleanUrl = url => _ =>
const cleanUrl = url =>
url.startsWith('blob:')
? url.replace(/#(.*)$/g, '')
: url
return Promise.resolve()
return Promise.resolve(url)
.then(st('loading', 'Downloading file'))
.then(cleanUrl(url))
.then(cleanUrl)
.then(fetch)
.then(st('loading', 'Processing file'))
.then(response => response.arrayBuffer())