Skip to content

Commit

Permalink
fix fileassetdir for uploaded assets
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Krick <[email protected]>
  • Loading branch information
mattkrick committed Jan 21, 2025
1 parent 61b1c46 commit 0f84e46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/toolboxSrc/pushToCDN.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import fs from 'fs'
import getFileStoreManager from 'parabol-server/fileStorage/getFileStoreManager'
import {Logger} from 'parabol-server/utils/Logger'
import path from 'path'
import getProjectRoot from '../webpack/utils/getProjectRoot'
import {Logger} from 'parabol-server/utils/Logger'

const PROJECT_ROOT = getProjectRoot()

Expand Down Expand Up @@ -66,7 +66,7 @@ const pushServerAssetsToCDN = async () => {
// static assets in /dist/images are already hosted at /static/images
if (process.env.FILE_STORE_PROVIDER === 'local') return
const targetObject = `images/${filename}`
const exists = await fileStoreManager.checkExists(targetObject)
const exists = await fileStoreManager.checkExists(targetObject, 'build')
if (exists) return false
const buffer = await fs.promises.readFile(path.join(localServerAssetsDir, filename))
const url = await fileStoreManager.putBuildFile(buffer, targetObject)
Expand Down

0 comments on commit 0f84e46

Please sign in to comment.