UNPKG

rune

Version:

CLI to upload your games to Rune

11 lines (10 loc) 295 B
import fs from "fs"; import mime from "mime-types"; import path from "path"; export function prepareFileUpload(filePath) { return { name: path.basename(filePath), content: fs.readFileSync(filePath), type: mime.lookup(filePath) || "application/octet-stream", }; }