fix: create attachments middleware (#3794)

This commit is contained in:
ChengLei Shao 2024-03-24 19:08:53 +08:00 committed by GitHub
parent 921696f40b
commit e410dece22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,7 +2,7 @@ import actions from '@nocobase/actions';
import { createMiddleware, destroyMiddleware } from './attachments'; import { createMiddleware, destroyMiddleware } from './attachments';
export default function ({ app }) { export default function ({ app }) {
app.resourcer.use(createMiddleware); app.resourcer.use(createMiddleware, { tag: 'createMiddleware', after: 'auth' });
app.resourcer.registerActionHandler('upload', actions.create); app.resourcer.registerActionHandler('upload', actions.create);
app.resourcer.use(destroyMiddleware); app.resourcer.use(destroyMiddleware);