diff --git a/src/controllers/FileController.ts b/src/controllers/FileController.ts index a8327b1..acac5a5 100644 --- a/src/controllers/FileController.ts +++ b/src/controllers/FileController.ts @@ -76,7 +76,7 @@ export default class FileController extends Controller { storage_type: 'local', storage_path: 'storage/uploads/' + slug, size: upload.size, - ttl: ttl, + expires_at: ttl <= 0 ? null : new Date(Date.now() + ttl * 1000), }); await file.save();