mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
Added custom formatter to uploads limit
refs https://linear.app/tryghost/issue/CORE-121/create-a-video-storage-adapter - Provides readable bytes -> megabytes conversion for filesize limit
This commit is contained in:
parent
4172f993d4
commit
f6fbfe712a
1 changed files with 4 additions and 1 deletions
|
@ -50,6 +50,9 @@ module.exports = {
|
|||
// NOTE: this function should not ever be used as for uploads we compare the size
|
||||
// of the uploaded file with the configured limit. Noop is here to keep the
|
||||
// MaxLimit constructor happy
|
||||
currentCountQuery: () => {}
|
||||
currentCountQuery: () => {},
|
||||
// NOTE: the uploads limit is based on file sizes provided in Bytes
|
||||
// a custom formatter is here for more user-friendly formatting when forming an error
|
||||
formatter: count => `${count / 1000000}MB`
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue