mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 09:47:10 +00:00
fix(plugin-file-manager): upgrade multer-aliyun-oss package to fix size (#352)
This commit is contained in:
parent
71ce533987
commit
53ef901156
@ -22,7 +22,7 @@
|
|||||||
"mime-match": "^1.0.2",
|
"mime-match": "^1.0.2",
|
||||||
"mkdirp": "~0.5.4",
|
"mkdirp": "~0.5.4",
|
||||||
"multer": "^1.4.2",
|
"multer": "^1.4.2",
|
||||||
"multer-aliyun-oss": "1.1.1",
|
"multer-aliyun-oss": "2.1.1",
|
||||||
"multer-s3": "^2.10.0"
|
"multer-s3": "^2.10.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -11,6 +11,7 @@ describe('storage:ali-oss', () => {
|
|||||||
let app: MockServer;
|
let app: MockServer;
|
||||||
let agent;
|
let agent;
|
||||||
let db: Database;
|
let db: Database;
|
||||||
|
let storage;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
app = await getApp();
|
app = await getApp();
|
||||||
@ -18,7 +19,7 @@ describe('storage:ali-oss', () => {
|
|||||||
db = app.db;
|
db = app.db;
|
||||||
|
|
||||||
const Storage = db.getCollection('storages').model;
|
const Storage = db.getCollection('storages').model;
|
||||||
await Storage.create({
|
storage = await Storage.create({
|
||||||
...aliossStorage.defaults(),
|
...aliossStorage.defaults(),
|
||||||
name: `ali-oss_${db.getTablePrefix()}`,
|
name: `ali-oss_${db.getTablePrefix()}`,
|
||||||
default: true,
|
default: true,
|
||||||
@ -46,11 +47,10 @@ describe('storage:ali-oss', () => {
|
|||||||
title: 'text',
|
title: 'text',
|
||||||
extname: '.txt',
|
extname: '.txt',
|
||||||
path: 'test/path',
|
path: 'test/path',
|
||||||
// TODO(bug): alioss will not return the size of file
|
size: 13,
|
||||||
// size: 13,
|
|
||||||
mimetype: 'text/plain',
|
mimetype: 'text/plain',
|
||||||
meta: {},
|
meta: {},
|
||||||
storage_id: 1,
|
storageId: storage.id,
|
||||||
};
|
};
|
||||||
|
|
||||||
// 文件上传和解析是否正常
|
// 文件上传和解析是否正常
|
||||||
|
@ -11,6 +11,7 @@ describe('storage:s3', () => {
|
|||||||
let app: MockServer;
|
let app: MockServer;
|
||||||
let agent;
|
let agent;
|
||||||
let db: Database;
|
let db: Database;
|
||||||
|
let storage;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
app = await getApp();
|
app = await getApp();
|
||||||
@ -18,7 +19,7 @@ describe('storage:s3', () => {
|
|||||||
db = app.db;
|
db = app.db;
|
||||||
|
|
||||||
const Storage = db.getCollection('storages').model;
|
const Storage = db.getCollection('storages').model;
|
||||||
await Storage.create({
|
storage = await Storage.create({
|
||||||
...s3Storage.defaults(),
|
...s3Storage.defaults(),
|
||||||
name: `s3_${db.getTablePrefix()}`,
|
name: `s3_${db.getTablePrefix()}`,
|
||||||
default: true,
|
default: true,
|
||||||
@ -49,7 +50,7 @@ describe('storage:s3', () => {
|
|||||||
size: 13,
|
size: 13,
|
||||||
mimetype: 'text/plain',
|
mimetype: 'text/plain',
|
||||||
meta: {},
|
meta: {},
|
||||||
storage_id: 1,
|
storageId: storage.id,
|
||||||
};
|
};
|
||||||
|
|
||||||
// 文件上传和解析是否正常
|
// 文件上传和解析是否正常
|
||||||
|
34
yarn.lock
34
yarn.lock
@ -3993,15 +3993,14 @@ ajv@^8.0.1:
|
|||||||
require-from-string "^2.0.2"
|
require-from-string "^2.0.2"
|
||||||
uri-js "^4.2.2"
|
uri-js "^4.2.2"
|
||||||
|
|
||||||
ali-oss@^6.8.0:
|
ali-oss@^6.16.0:
|
||||||
version "6.16.0"
|
version "6.17.1"
|
||||||
resolved "https://registry.npmjs.org/ali-oss/-/ali-oss-6.16.0.tgz#3b7fbe10f13fbd535478fc31c7d05aaf4280269b"
|
resolved "https://registry.yarnpkg.com/ali-oss/-/ali-oss-6.17.1.tgz#3e88738ec01111a26a2b967cf857d97050886156"
|
||||||
integrity sha512-tK/+yEKtBBD+kMoHABxg6lCgC+Ad9HNjCln7qdL6LRYbUm+FFTKJubC4hT2FIooMBDb9tnI7My4MVreKnbJQRg==
|
integrity sha512-v2oT3UhSJTH/LrsscVvi7iEGrnundydNaFzpYAKatqOl4JNcBV4UiwtlJU+ZHLys040JH2k+CutznA0GoE+P2w==
|
||||||
dependencies:
|
dependencies:
|
||||||
address "^1.0.0"
|
address "^1.0.0"
|
||||||
agentkeepalive "^3.4.1"
|
agentkeepalive "^3.4.1"
|
||||||
bowser "^1.6.0"
|
bowser "^1.6.0"
|
||||||
co-defer "^1.0.0"
|
|
||||||
copy-to "^2.0.1"
|
copy-to "^2.0.1"
|
||||||
dateformat "^2.0.0"
|
dateformat "^2.0.0"
|
||||||
debug "^2.2.0"
|
debug "^2.2.0"
|
||||||
@ -4011,7 +4010,7 @@ ali-oss@^6.8.0:
|
|||||||
humanize-ms "^1.2.0"
|
humanize-ms "^1.2.0"
|
||||||
is-type-of "^1.0.0"
|
is-type-of "^1.0.0"
|
||||||
js-base64 "^2.5.2"
|
js-base64 "^2.5.2"
|
||||||
jstoxml "^0.2.3"
|
jstoxml "^2.0.0"
|
||||||
merge-descriptors "^1.0.1"
|
merge-descriptors "^1.0.1"
|
||||||
mime "^2.4.5"
|
mime "^2.4.5"
|
||||||
mz-modules "^2.1.0"
|
mz-modules "^2.1.0"
|
||||||
@ -5389,11 +5388,6 @@ co-body@^6.0.0:
|
|||||||
raw-body "^2.3.3"
|
raw-body "^2.3.3"
|
||||||
type-is "^1.6.16"
|
type-is "^1.6.16"
|
||||||
|
|
||||||
co-defer@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.npmjs.org/co-defer/-/co-defer-1.0.0.tgz#3e4a787a8eed6b0a21ee287c094f7e8de0d3c818"
|
|
||||||
integrity sha1-Pkp4eo7tawoh7ih8CU9+jeDTyBg=
|
|
||||||
|
|
||||||
co@^4.6.0:
|
co@^4.6.0:
|
||||||
version "4.6.0"
|
version "4.6.0"
|
||||||
resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
|
resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
|
||||||
@ -10063,10 +10057,10 @@ jsprim@^1.2.2:
|
|||||||
json-schema "0.2.3"
|
json-schema "0.2.3"
|
||||||
verror "1.10.0"
|
verror "1.10.0"
|
||||||
|
|
||||||
jstoxml@^0.2.3:
|
jstoxml@^2.0.0:
|
||||||
version "0.2.4"
|
version "2.2.9"
|
||||||
resolved "https://registry.npmjs.org/jstoxml/-/jstoxml-0.2.4.tgz#ff3fb67856883a032953c7ce8ce7486210f48447"
|
resolved "https://registry.yarnpkg.com/jstoxml/-/jstoxml-2.2.9.tgz#2eebd5e55383fe66a375022ca0aa88f77bc4fb84"
|
||||||
integrity sha1-/z+2eFaIOgMpU8fOjOdIYhD0hEc=
|
integrity sha512-OYWlK0j+roh+eyaMROlNbS5cd5R25Y+IUpdl7cNdB8HNrkgwQzIS7L9MegxOiWNBj9dQhA/yAxiMwCC5mwNoBw==
|
||||||
|
|
||||||
"jsx-ast-utils@^2.4.1 || ^3.0.0":
|
"jsx-ast-utils@^2.4.1 || ^3.0.0":
|
||||||
version "3.2.1"
|
version "3.2.1"
|
||||||
@ -11278,12 +11272,12 @@ ms@2.1.2:
|
|||||||
resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||||
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||||
|
|
||||||
multer-aliyun-oss@1.1.1:
|
multer-aliyun-oss@2.1.1:
|
||||||
version "1.1.1"
|
version "2.1.1"
|
||||||
resolved "https://registry.npmjs.org/multer-aliyun-oss/-/multer-aliyun-oss-1.1.1.tgz#7d6c22989b8755205edbc4bcc233e08e5d13e2e1"
|
resolved "https://registry.yarnpkg.com/multer-aliyun-oss/-/multer-aliyun-oss-2.1.1.tgz#7b6b41385fce2905e8e258a7e68b453ef3982fa0"
|
||||||
integrity sha512-BcXibwKeHs2amI10ciIAGYWUQUZAX3sFJ3LIZJJsD0AN1xpF+ko2ruZQe01i47czL5sJaIxtRvRpYsVRTQmBaQ==
|
integrity sha512-EfDlv2oUZS94+VULybEo8rSlGTsV3YphmCAMT8/nMWBleQDjLMeV7tCK6dXe2Lj+yqRjaTHyuOMhbT5i4voHOQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
ali-oss "^6.8.0"
|
ali-oss "^6.16.0"
|
||||||
|
|
||||||
multer-s3@^2.10.0:
|
multer-s3@^2.10.0:
|
||||||
version "2.10.0"
|
version "2.10.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user