mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Add download query param to assets endpoint
This commit is contained in:
@@ -119,6 +119,10 @@ router.get(
|
||||
res.attachment(file.filename_download);
|
||||
res.setHeader('Content-Type', file.type);
|
||||
|
||||
if (req.query.hasOwnProperty('download') === false) {
|
||||
res.removeHeader('Content-Disposition');
|
||||
}
|
||||
|
||||
stream.pipe(res);
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user