mirror of
https://github.com/purocean/yn.git
synced 2026-09-24 15:46:02 +08:00
upd: remove mime-types
This commit is contained in:
@@ -41,7 +41,6 @@
|
||||
"koa-body": "^4.2.0",
|
||||
"lodash": "^4.17.21",
|
||||
"mime": "^2.5.2",
|
||||
"mime-types": "^2.1.31",
|
||||
"mitt": "^2.1.0",
|
||||
"node-pty": "^0.10.1",
|
||||
"plantuml-pipe": "^1.4.0",
|
||||
@@ -67,7 +66,6 @@
|
||||
"@types/lodash-es": "^4.17.4",
|
||||
"@types/markdown-it": "^12.2.3",
|
||||
"@types/mime": "^2.0.3",
|
||||
"@types/mime-types": "^2.1.0",
|
||||
"@types/node": "^15.12.2",
|
||||
"@types/request": "^2.48.5",
|
||||
"@types/socket.io-client": "^1.4.34",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import mime from 'mime-types'
|
||||
import mime from 'mime'
|
||||
import * as api from '@fe/support/api'
|
||||
import { encodeMarkdownLink } from '@fe/utils'
|
||||
import { useToast } from '@fe/support/ui/toast'
|
||||
@@ -43,7 +43,7 @@ async function transformImgOutLink (img: HTMLImageElement) {
|
||||
const headers = JSON.parse(img.getAttribute('headers') || '{}')
|
||||
const res = await api.proxyRequest(img.src, { method: 'get', headers })
|
||||
const blob = await res.blob()
|
||||
const imgFile = new File([blob!], 'file.' + mime.extension(res.headers.get('content-type')!))
|
||||
const imgFile = new File([blob!], 'file.' + mime.getExtension(res.headers.get('content-type')!))
|
||||
const assetPath = await upload(imgFile, currentFile)
|
||||
replacedLink = assetPath
|
||||
}
|
||||
|
||||
@@ -1424,11 +1424,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/mdurl/-/mdurl-1.0.2.tgz#e2ce9d83a613bacf284c7be7d491945e39e1f8e9"
|
||||
integrity sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==
|
||||
|
||||
"@types/mime-types@^2.1.0":
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/mime-types/-/mime-types-2.1.0.tgz#9ca52cda363f699c69466c2a6ccdaad913ea7a73"
|
||||
integrity sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM=
|
||||
|
||||
"@types/mime@^1":
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a"
|
||||
@@ -6985,7 +6980,7 @@ mime-db@^1.28.0:
|
||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c"
|
||||
integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==
|
||||
|
||||
mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.31, mime-types@~2.1.19, mime-types@~2.1.24:
|
||||
mime-types@^2.1.12, mime-types@^2.1.18, mime-types@~2.1.19, mime-types@~2.1.24:
|
||||
version "2.1.31"
|
||||
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.31.tgz#a00d76b74317c61f9c2db2218b8e9f8e9c5c9e6b"
|
||||
integrity sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==
|
||||
|
||||
Reference in New Issue
Block a user