fileDecrypter: fix download and encrypting state
This commit is contained in:
parent
b35c57f591
commit
182c225528
|
@ -49,10 +49,10 @@ class FileDecrypter extends React.Component
|
|||
progress: e.loaded / e.total
|
||||
xhr.addEventListener 'readystatechange', =>
|
||||
if xhr.readyState == XMLHttpRequest.DONE
|
||||
if xhr.status == 200
|
||||
await @decryptFile xhr.response
|
||||
@setState
|
||||
downloading: false
|
||||
return if xhr.status != 200 # We always fail silently here
|
||||
@decryptFile xhr.response
|
||||
xhr.open 'GET', @originalUrl
|
||||
xhr.send()
|
||||
|
||||
|
|
Loading…
Reference in a new issue