Skip to content
Advertisement

URL.createObjectURL wouldn’t work asynchronously (React)

URL.createObjectUrl wouldn’t work when I re-upload another file after uploading at the first time. videoFile is updated but it doesn’t generate object url…

JavaScript

Advertisement

Answer

It works. Just render the video element when file exists.

Refer to the working example on Codesandbox.

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement