UNPKG

local-file-upload

Version:

local file uploading using ts. it will save the file or image into the local storage. build for nodejs and hono application.

12 lines (11 loc) 557 B
import { Buffer } from "node:buffer"; type UploadFile = { buffer?: Buffer; arrayBuffer?: () => Promise<ArrayBuffer>; name?: string; originalname?: string; }; export declare function insertFile(file: UploadFile, folderName: string, uploadDir?: string, givenName?: string): Promise<string>; export declare function deleteFile(filePath: string, uploadDir?: string): Promise<void>; export declare function updateFile(file: UploadFile, oldFilePath: string, folderName: string, uploadDir?: string, givenName?: string): Promise<string>; export {};