mirror of
https://github.com/rikkaneko/paste.git
synced 2025-06-06 16:45:41 +00:00
Add Content-Disposition for inline file
Signed-off-by: Joe Ma <rikkaneko23@gmail.com>
This commit is contained in:
parent
a26f627149
commit
f354a7e1fd
1 changed files with 2 additions and 0 deletions
|
@ -271,6 +271,8 @@ export default {
|
|||
|
||||
res.headers.set("cache-control", "public, max-age=18000");
|
||||
res.headers.set("content-type", descriptor.mime_type ?? "application/octet-stream");
|
||||
res.headers.set("content-disposition",
|
||||
`inline; filename="${encodeURIComponent(descriptor.title ?? uuid)}"`);
|
||||
|
||||
if (option === "download") {
|
||||
res.headers.set("content-disposition",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue