Closed owendswang closed 2 years ago
'dynamic' option is not working.
OS version: Ubuntu 20.04 x64 Node v16
Description: Even set 'dynamic' to true, new uploaded files cannot be get and got 404 instead.
Even set 'dynamic' to true, new uploaded files cannot be get and got 404 instead.
Get new uploaded files, not 404.
app.use(staticCache(path.join(__dirname, './uploads'), { prefix: '/uploads', maxAge: 30 * 24 * 60 * 60, dynamic: true })); or app.use(mount('uploads', staticCache(path.join(__dirname, './uploads'), { maxAge: 30 * 24 * 60 * 60, dynamic: true })));
app.use(staticCache(path.join(__dirname, './uploads'), { prefix: '/uploads', maxAge: 30 * 24 * 60 * 60, dynamic: true }));
app.use(mount('uploads', staticCache(path.join(__dirname, './uploads'), { maxAge: 30 * 24 * 60 * 60, dynamic: true })));
Sorry. I didn't upload the fixed one to production. It works.
Describe the bug
'dynamic' option is not working.
OS version: Ubuntu 20.04 x64 Node v16
Description: Even set 'dynamic' to true, new uploaded files cannot be get and got 404 instead.
Actual behavior
Even set 'dynamic' to true, new uploaded files cannot be get and got 404 instead.
Expected behavior
Get new uploaded files, not 404.
Code to reproduce
app.use(staticCache(path.join(__dirname, './uploads'), { prefix: '/uploads', maxAge: 30 * 24 * 60 * 60, dynamic: true }));
orapp.use(mount('uploads', staticCache(path.join(__dirname, './uploads'), { maxAge: 30 * 24 * 60 * 60, dynamic: true })));
Checklist