0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Added static file limit handling in Files API

refs https://github.com/TryGhost/Toolbox/issues/114

- Just like with media files same limits apply and can be configured through the usual limit service's config
This commit is contained in:
Naz 2021-11-08 16:06:21 +04:00
parent be748f2f6d
commit f0242baf9f
2 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,7 @@
const limitService = require('../../../../../services/limits');
module.exports = {
async upload(apiConfig, frame) {
await limitService.errorIfIsOverLimit('uploads', {currentCount: frame.file.size});
}
};

View file

@ -31,6 +31,10 @@ module.exports = {
return require('./media');
},
get files() {
return require('./files');
},
get settings() {
return require('./settings');
},