Closed kid-wumeng closed 7 years ago
hi, i has a question
for example:
{fields, files} = await asyncBusboy(ctx.req)
i can get the mime, path, filename and others information of files[0] but the file's size.
how to get size? is must to use the fs.stat(path) or read to buffer ?
You have to use fs.stat(PATH). files array includes list of file ReadStream, so you can not get the file size by using it.
fs.stat(PATH)
files
@dominhhai ok, thanks
hi, i has a question
for example:
i can get the mime, path, filename and others information of files[0] but the file's size.
how to get size? is must to use the fs.stat(path) or read to buffer ?