Skip to content

Commit a730cde

Browse files
committed
Fix CLI
1 parent 38f4bdb commit a730cde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Readline from 'node:readline/promises';
99
import { parseArgs } from "node:util";
1010
import nodePath from 'path-browserify';
1111
import { parse as parseMime } from 'file-type-mime';
12-
import mime from 'mime';
12+
import { lookupMime } from '@/lib/mime';
1313
import { create as createCid, format as formatCid } from '@atcute/cid';
1414

1515
let {
@@ -90,7 +90,7 @@ if (command === 'upload') {
9090
// TODO find existing CID and don't upload if unchanged
9191
const blob = await agent.uploadBlob(
9292
new Blob([file], {
93-
type: mime.getType(realPath) ?? parseMime(file.buffer as ArrayBuffer)?.mime
93+
type: lookupMime(realPath) ?? parseMime(file.buffer as ArrayBuffer)?.mime
9494
})
9595
);
9696

0 commit comments

Comments
 (0)