Skip to content

Commit a81854d

Browse files
authored
Remove file-type dependency (line#757)
1 parent b962ab1 commit a81854d

File tree

3 files changed

+9
-98
lines changed

3 files changed

+9
-98
lines changed

lib/http-axios.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import axios, {
66
} from "axios";
77
import { Readable } from "node:stream";
88
import { HTTPError, ReadError, RequestError } from "./exceptions";
9-
import * as fileType from "file-type";
109

1110
const pkg = require("../package.json");
1211

@@ -143,7 +142,7 @@ export default class HTTPClient {
143142

144143
const res = await this.instance.post(url, buffer, {
145144
headers: {
146-
"Content-Type": contentType || (await fileType.fromBuffer(buffer)).mime,
145+
"Content-Type": contentType || "image/png",
147146
"Content-Length": buffer.length,
148147
},
149148
});

package-lock.json

Lines changed: 7 additions & 94 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
"@types/node": "^20.0.0"
4242
},
4343
"optionalDependencies": {
44-
"axios": "^1.0.0",
45-
"file-type": "^16.5.4"
44+
"axios": "^1.0.0"
4645
},
4746
"devDependencies": {
4847
"@types/express": "4.17.21",

0 commit comments

Comments
 (0)