Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F7112665
file.test.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
524 B
Referenced Files
None
Subscribers
None
file.test.ts
View Options
import
{
FileManager
}
from
"@sealcode/file-manager"
;
import
{
ExtractParsed
}
from
"./component-argument.js"
;
import
{
Image
}
from
"./image.js"
;
describe
(
"File field"
,
()
=>
{
it
(
"Properly describes the parsed value"
,
async
()
=>
{
const
file_manager
=
new
FileManager
(
"/tmp"
,
"/files"
);
const
image_arg
=
new
Image
();
const
value
=
file_manager
.
fromContent
(
Buffer
.
from
(
"abc"
),
"some_file.txt"
)
as
ExtractParsed
<
typeof
image_arg
>
;
value
?
.
file_manager
;
// should work OK if the types are right
});
});
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Fri, Jul 4, 00:38 (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
783144
Default Alt Text
file.test.ts (524 B)
Attached To
Mode
rJDD jdd
Attached
Detach File
Event Timeline
Log In to Comment