Awaits as you save the file?

Use the library for Node node-fluent-ffmpeg

Create a file in two formats, functions wrapped in promises.

Perform

Promise.all([makeWebm(file, slug), makeMp4(file, slug)])


And then in then dales work with the file. Now, sometimes, through time, referring to the newly created file in then throws me the error

Error: ENOENT: no such file or directory

File of course there is, but it is at this point that I believe is still stored on disk (by opening Explorer, I see the icon that the file is in the treatment of several milliseconds). What to do in this case? Well, do not write the same timeout.
June 3rd 19 at 20:19
0 answer

Find more questions by tags Node.js