@nocobase/plugin-file-manager 0.7.0-alpha.82 → 0.7.1-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,42 +6,42 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.action = action;
7
7
  exports.middleware = middleware;
8
8
 
9
- function _path() {
10
- const data = _interopRequireDefault(require("path"));
9
+ function _multer() {
10
+ const data = _interopRequireDefault(require("@koa/multer"));
11
11
 
12
- _path = function _path() {
12
+ _multer = function _multer() {
13
13
  return data;
14
14
  };
15
15
 
16
16
  return data;
17
17
  }
18
18
 
19
- function _multer() {
20
- const data = _interopRequireDefault(require("@koa/multer"));
19
+ function _database() {
20
+ const data = require("@nocobase/database");
21
21
 
22
- _multer = function _multer() {
22
+ _database = function _database() {
23
23
  return data;
24
24
  };
25
25
 
26
26
  return data;
27
27
  }
28
28
 
29
- var _storages = require("../storages");
30
-
31
- var Rules = _interopRequireWildcard(require("../rules"));
32
-
33
- var _constants = require("../constants");
34
-
35
- function _database() {
36
- const data = require("@nocobase/database");
29
+ function _path() {
30
+ const data = _interopRequireDefault(require("path"));
37
31
 
38
- _database = function _database() {
32
+ _path = function _path() {
39
33
  return data;
40
34
  };
41
35
 
42
36
  return data;
43
37
  }
44
38
 
39
+ var _constants = require("../constants");
40
+
41
+ var Rules = _interopRequireWildcard(require("../rules"));
42
+
43
+ var _storages = require("../storages");
44
+
45
45
  const _excluded = ["size"];
46
46
 
47
47
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -206,6 +206,7 @@ function _action() {
206
206
  var _ref2 = _asyncToGenerator(function* (transaction) {
207
207
  // TODO(optimize): 应使用关联 accessors 获取
208
208
  const result = yield storage.createAttachment(data, {
209
+ context: ctx,
209
210
  transaction
210
211
  });
211
212
  const _ctx$action$params2 = ctx.action.params,
@@ -7,6 +7,8 @@ exports.default = void 0;
7
7
  var _default = {
8
8
  name: 'attachments',
9
9
  title: '文件管理器',
10
+ createdBy: true,
11
+ updatedBy: true,
10
12
  fields: [{
11
13
  comment: '用户文件名(不含扩展名)',
12
14
  type: 'string',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-file-manager",
3
- "version": "0.7.0-alpha.82",
3
+ "version": "0.7.1-alpha.4",
4
4
  "main": "lib/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "licenses": [
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "dependencies": {
13
13
  "@koa/multer": "^3.0.0",
14
- "@nocobase/server": "0.7.0-alpha.82",
14
+ "@nocobase/server": "0.7.1-alpha.4",
15
15
  "aws-sdk": "^2.2.32",
16
16
  "koa-static": "^5.0.0",
17
17
  "mime-match": "^1.0.2",
@@ -21,9 +21,9 @@
21
21
  "multer-s3": "^2.10.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@nocobase/test": "0.7.0-alpha.82",
24
+ "@nocobase/test": "0.7.1-alpha.4",
25
25
  "@types/koa-multer": "^1.0.1",
26
26
  "@types/multer": "^1.4.5"
27
27
  },
28
- "gitHead": "4820fd09375c7200d1ea0bb0aab1bd4783b80d3d"
28
+ "gitHead": "570d039f1904a041729c1967c0637b1109c278a8"
29
29
  }