Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F10360750
jdd-context.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
657 B
Referenced Files
None
Subscribers
None
jdd-context.ts
View Options
import
type
{
BaseContext
}
from
"koa"
;
import
type
{
JDDContext
}
from
"@sealcode/jdd"
;
import
type
{
FilePointer
}
from
"@sealcode/file-manager"
;
import
{
makeSimpleJDDContext
}
from
"@sealcode/jdd"
;
import
{
TheFileManager
}
from
"./file-manager.js"
;
import
{
imageRouter
}
from
"./image-router.js"
;
export
function
makeJDDContext
(
ctx
:
BaseContext
)
:
JDDContext
{
return
{
...
makeSimpleJDDContext
(
TheFileManager
),
render_image
:
async
(
image
:
string
|
FilePointer
|
null
,
args
)
=>
{
if
(
!
image
)
{
return
""
;
}
const
file
=
await
TheFileManager
.
toPointer
(
image
);
return
imageRouter
.
image
(
await
file
.
getPath
(),
args
);
},
ctx
,
};
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sat, Nov 8, 08:29 (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1033476
Default Alt Text
jdd-context.ts (657 B)
Attached To
Mode
rAPROXY Assetproxy
Attached
Detach File
Event Timeline
Log In to Comment