Closed camjac251 closed 4 years ago
Thanks. It was actually originally meant to create uploads
directory first, aka the parent. But I had the loop on Promise.all
, which would instead run them all in parallel, which introduced the issue of uploads
directory only being created after chunks
was trying to create itself.
I believe this might be an easy fix with using
mkdir -p
instead ofmkdir
. It is trying to create the chunks folder in a nonexistent uploads folder.-p
ensures that all parent folders are made if they do not exist