0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Removed mediaAPI GA labs flag

refs https://github.com/TryGhost/Team/issues/1258

- media API is GA so labs flag and conditional access to media API routes is no longer necessary
This commit is contained in:
Kevin Ansfield 2022-01-04 13:11:23 +00:00
parent 09228298b1
commit 2773e82e3e
3 changed files with 1 additions and 4 deletions

View file

@ -118,7 +118,7 @@ module.exports = function setupSiteApp(options = {}) {
// Serve blog images using the storage adapter
siteApp.use(STATIC_IMAGE_URL_PREFIX, mw.handleImageSizes, storage.getStorage('images').serve());
// Serve blog media using the storage adapter
siteApp.use(STATIC_MEDIA_URL_PREFIX, labs.enabledMiddleware('mediaAPI'), storage.getStorage('media').serve());
siteApp.use(STATIC_MEDIA_URL_PREFIX, storage.getStorage('media').serve());
// Serve blog files using the storage adapter
siteApp.use(STATIC_FILES_URL_PREFIX, labs.enabledMiddleware('filesAPI'), storage.getStorage('files').serve());

View file

@ -238,14 +238,12 @@ module.exports = function apiRoutes() {
// ## media
router.post('/media/upload',
labs.enabledMiddleware('mediaAPI'),
mw.authAdminApi,
apiMw.upload.media('file', 'thumbnail'),
apiMw.upload.mediaValidation({type: 'media'}),
http(api.media.upload)
);
router.put('/media/thumbnail/upload',
labs.enabledMiddleware('mediaAPI'),
mw.authAdminApi,
apiMw.upload.single('file'),
apiMw.upload.validation({type: 'images'}),

View file

@ -15,7 +15,6 @@ const messages = {
// flags in this list always return `true`, allows quick global enable prior to full flag removal
const GA_FEATURES = [
'mediaAPI',
'membersAutoLogin',
'filesAPI',
'fileCard',