thank fk
This commit is contained in:
1 parent
396b288ea8
commit
763b225fc2
8 files changed
+561
-96
No files matched your search
+3
-2
@@ -2,10 +2,11 @@ import type { PrismaClient, Attachment, Meme } from '@prisma/client';
|
||||
|
||||
import * as attachments from './attachments'
|
||||
|
||||
const STORAGE_BUCKET = process.env.STORAGE_BUCKET
|
||||
|
||||
function memeUrl(a: Attachment) {
|
||||
const STORAGE_URL = process.env.STORAGE_URL
|
||||
const path = attachments.objectName(a)
|
||||
const u = new URL(path, `https://${STORAGE_URL}`)
|
||||
const u = new URL(`${STORAGE_BUCKET}/${attachments.objectName(a)}`, `https://${STORAGE_URL}`)
|
||||
return u.href
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user