Multer create new folder with data
<p>I use <a href="https://github.com/expressjs/multer" rel="noreferrer">multer</a>.</p>
<h3>Question 1</h3>
<p>When I put the following snippet in the <code>app.js</code></p>
<pre><code>app.use(multer({
        dest: './uploads'
    }
).single('file'));
</code></pre>
<p>it creates a new folder under the root folder, my question is about this new folder's lifeCycle, When it'll be deleted? How much the size of the folder could be after 100 call?</p>
<h3>Question 2</h3>
<p>If I don't want to limit the file size, what I should put in the configuration?</p>
<pre><code>app.use(multer({
    dest: './public/profile/img/',
    limits: {
        fieldNameSize: 50,
        files: 1,
        fields: 5,
        fileSize: 1024 * 1024
    },
</code></pre>
<p><strong>Update</strong></p>
<p>My app is built like</p>
<p>app.js file contain</p>
<pre><code>    app.use(multer({
            dest: './uploads'
        }
    ).single('file'));

app.use('/', routes, function (req, res, next) {
    next();
});
</code></pre>
<p>The route file look like following</p>
<pre><code>appRouter
    .post('*', function (req, res) {
        handler.dispatch(req, res)
    })
    .get('*', function (req, res) {
        handler.dispatch(req, res)
    })
</code></pre>
<p>And in third file I use the unzip like following</p>
<pre><code>update: function (req, res) {
  var filePath = path.join(req.file.destination, req.file.filename);
            var unzipper = new Unzipper(filePath);
            unzipper.on(&quot;extract&quot;, function () {
                console.log(&quot;Finished extracting&quot;);
                res.sendStatus(200);
            });
            unzipper.on('progress', function (fileIndex, fileCount) {
                console.log('Extracted file ' + (fileIndex + 1) + ' of ' + fileCount);
            });
            unzipper.on('list', function (files) {
                console.log('The archive contains:');
                console.log(files);
            });

            unzipper.on('error', function (err) {
                console.log('Caught an error', err);
            });

            unzipper.extract({
                path: &quot;./&quot;
            });
        }
</code></pre>
<p>The below is how my node Application is structured, can someone please advice how and where(which file) its <strong>recommended</strong> to use the Raf code with adding a dateTime to the file which I can add sorting ...</p>