mirror of
https://github.com/strapi/strapi.git
synced 2025-09-04 14:23:03 +00:00
feat: move extensions to bootsrap instead of register
This commit is contained in:
parent
1e545ae1e9
commit
1e6f407cda
6
packages/core/upload/server/bootstrap.js
vendored
6
packages/core/upload/server/bootstrap.js
vendored
@ -39,6 +39,12 @@ module.exports = async ({ strapi }) => {
|
|||||||
|
|
||||||
await getService('weeklyMetrics').registerCron();
|
await getService('weeklyMetrics').registerCron();
|
||||||
getService('metrics').sendUploadPluginMetrics();
|
getService('metrics').sendUploadPluginMetrics();
|
||||||
|
|
||||||
|
if (strapi.config.get('plugin.upload.onlySignUrlsAdmin', false)) {
|
||||||
|
getService('extensions').contentManager.entityManager.addSignedFileUrlsToAdmin();
|
||||||
|
} else {
|
||||||
|
getService('extensions').core.entityService.addSignedFileUrlsToEntityService();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const registerPermissionActions = async () => {
|
const registerPermissionActions = async () => {
|
||||||
|
@ -6,7 +6,6 @@ const {
|
|||||||
} = require('@strapi/utils');
|
} = require('@strapi/utils');
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
const registerUploadMiddleware = require('./middlewares/upload');
|
const registerUploadMiddleware = require('./middlewares/upload');
|
||||||
const { getService } = require('./utils');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register upload plugin
|
* Register upload plugin
|
||||||
@ -17,8 +16,6 @@ module.exports = async ({ strapi }) => {
|
|||||||
|
|
||||||
await registerUploadMiddleware({ strapi });
|
await registerUploadMiddleware({ strapi });
|
||||||
|
|
||||||
getService('extensions').contentManager.entityManager.addSignedFileUrlsToAdmin();
|
|
||||||
|
|
||||||
if (strapi.plugin('graphql')) {
|
if (strapi.plugin('graphql')) {
|
||||||
require('./graphql')({ strapi });
|
require('./graphql')({ strapi });
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user