Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F7860103
uploaded-files.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
534 B
Referenced Files
None
Subscribers
None
uploaded-files.ts
View Options
import
Router
from
"@koa/router"
;
import
File
from
"../../data-structures/file"
;
const
uploaded_files
=
new
Router
();
uploaded_files
.
get
(
"/:id/:filename"
,
async
(
ctx
)
=>
{
const
file
=
await
File
.
fromID
(
ctx
.
$app
,
ctx
.
params
.
id
);
ctx
.
body
=
file
.
getStream
();
// removing this as it only created trouble and you can declare download
// target in html <a> element, anyway
// ctx.set(
// "Content-Disposition",
// `attachment; filename*=utf-8''="${encodeURIComponent(file.filename)}"`
// );
});
export
default
uploaded_files
;
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, Aug 13, 17:15 (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
870323
Default Alt Text
uploaded-files.ts (534 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment