new storage

This commit is contained in:
localhost 2025-02-25 09:01:38 +01:00
parent 48751c5814
commit 382be3c1df
1 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ const images3 = new S3({
async function uploadVideo(video: string) {
const videoFile = fs.readFileSync(video)
const uploaded = await videos3.put(video.split('/')[2], videoFile)
return uploaded.url.replace(keys.endpoint, 'https://s2.archive.party')
return uploaded.url.replace(keys.endpoint, 'https://s3.archive.party')
}
async function uploadImage(id: string, url: string) {
@ -32,7 +32,7 @@ async function uploadImage(id: string, url: string) {
const buffer = Buffer.from(await response.arrayBuffer())
const uploaded = await images3.put(`${id}.webp`, buffer)
return uploaded.url.replace(keys.endpoint, 'https://s2.archive.party')
return uploaded.url.replace(keys.endpoint, 'https://s3.archive.party')
}
export { uploadVideo, uploadImage }