Page MenuHomeSealhub

file.test.ts
No OneTemporary

file.test.ts

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

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)

Event Timeline