node-formidable / formidable

The most used, flexible, fast and streaming parser for multipart form data. Supports uploading to serverless environments, AWS S3, Azure, GCP or the filesystem. Used in production.
MIT License
7k stars 680 forks source link

Get total file size #925

Open tyzion opened 1 year ago

tyzion commented 1 year ago

Discussed in https://github.com/node-formidable/formidable/discussions/924

Originally posted by **tyzion** February 10, 2023 Hi, I have a question Is it possible to get the total size of uploaded files from the library without calculating it myself? I have setup a **maxTotalFileSize**, so I think the library already has that info, am I right? I'm asking because I haven't found any info about this.
tunnckoCore commented 1 year ago

@tyzion hi.

I don't think we are passing it anywhere, yea.. Good point.

GrosSacASac commented 1 year ago

._totalFileSize property on form. So we could make this a public property instead of private.

If yes we could maybe make reconsider other properties to make public as well.