This commit is contained in:
Jackson Harper 2022-06-09 12:08:42 -07:00
parent e23eada168
commit 05ea57f76f
2 changed files with 7 additions and 8 deletions

View file

@ -115,10 +115,12 @@ export const uploadFileRequestResolver: ResolverFn<
// If we have a file:// URL, don't try to match it
// and create a copy of the page, just create a
// new item.
const page = isFileUrl(input.url) ? await getPageByParam({
userId: claims.uid,
url: input.url,
}) : undefined
const page = isFileUrl(input.url)
? await getPageByParam({
userId: claims.uid,
url: input.url,
})
: undefined
if (page) {
if (

View file

@ -16,10 +16,7 @@ const storage = env.fileUpload?.gcsUploadSAKeyFilePath
const bucketName = env.fileUpload.gcsUploadBucket
export const getFilePublicUrl = (filePathName: string): string => {
return storage
.bucket(bucketName)
.file(filePathName)
.publicUrl()
return storage.bucket(bucketName).file(filePathName).publicUrl()
}
export const generateUploadSignedUrl = async (