mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Cleaned up use of 'content/media' magic string
refs https://linear.app/tryghost/issue/CORE-121/create-a-video-storage-adapter - `content/media` path is now a part of the constants package and should've been used instead of a magic-string.
This commit is contained in:
parent
d20732ce34
commit
d657432531
1 changed files with 3 additions and 3 deletions
|
@ -1,9 +1,9 @@
|
|||
const config = require('../../../../../../shared/config');
|
||||
const STATIC_VIDEO_URL_PREFIX = require('@tryghost/constants');
|
||||
|
||||
function getURL(urlPath) {
|
||||
const STATIC_VIDEO_URL_PREFIX = 'content/media';
|
||||
const imagePathRe = new RegExp('^' + config.getSubdir() + '/' + STATIC_VIDEO_URL_PREFIX);
|
||||
const absolute = imagePathRe.test(urlPath) ? true : false;
|
||||
const media = new RegExp('^' + config.getSubdir() + '/' + STATIC_VIDEO_URL_PREFIX);
|
||||
const absolute = media.test(urlPath) ? true : false;
|
||||
|
||||
if (absolute) {
|
||||
// Remove the sub-directory from the URL because ghostConfig will add it back.
|
||||
|
|
Loading…
Add table
Reference in a new issue