Match existing env variable
This commit is contained in:
@@ -2,9 +2,13 @@ import { getConfigOption, getNumericConfigOption } from '@ipp/core'
|
||||
|
||||
const MB = 1024 * 1024
|
||||
|
||||
/** IPP's public URL from `GALLERY_URL`, without a trailing slash, or undefined when unset. */
|
||||
/**
|
||||
* IPP's public URL from `PUBLIC_BASE_URL`, without a trailing slash, or
|
||||
* undefined when unset. The same name and value as on the IPP container, so
|
||||
* the two environment blocks in a compose file match.
|
||||
*/
|
||||
export function galleryUrl (): string | undefined {
|
||||
return (process.env.GALLERY_URL || '').replace(/\/+$/, '') || undefined
|
||||
return (process.env.PUBLIC_BASE_URL || '').replace(/\/+$/, '') || undefined
|
||||
}
|
||||
|
||||
/** Largest single file accepted, in bytes, from `ipp.upload.maxFileSize` (MB). */
|
||||
|
||||
@@ -7,7 +7,7 @@ export interface UploadPageProps {
|
||||
config: UploadPageConfig
|
||||
/** Path prefix the app is mounted under, without a trailing slash. Empty at the root. */
|
||||
basePath: string
|
||||
/** This share's gallery on IPP, when `GALLERY_URL` is set. */
|
||||
/** This share's gallery on IPP, when `PUBLIC_BASE_URL` is set. */
|
||||
galleryLink?: string
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user