File tree Expand file tree Collapse file tree 4 files changed +7
-2
lines changed Expand file tree Collapse file tree 4 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { db } from "@cap/database";
33import { decrypt , encrypt } from "@cap/database/crypto" ;
44import { nanoId } from "@cap/database/helpers" ;
55import { s3Buckets } from "@cap/database/schema" ;
6+ import { S3Bucket } from "@cap/web-domain" ;
67import { zValidator } from "@hono/zod-validator" ;
78import { eq } from "drizzle-orm" ;
89import { Hono } from "hono" ;
@@ -31,7 +32,7 @@ app.post(
3132 try {
3233 // Encrypt the sensitive data
3334 const encryptedConfig = {
34- id : nanoId ( ) ,
35+ id : S3Bucket . S3BucketId . make ( nanoId ( ) ) ,
3536 provider : data . provider ,
3637 accessKeyId : await encrypt ( data . accessKeyId ) ,
3738 secretAccessKey : await encrypt ( data . secretAccessKey ) ,
Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ app.post(
251251 "Sending to S3:" ,
252252 JSON . stringify (
253253 {
254- Bucket : bucket . name ,
254+ Bucket : bucket . bucketName ,
255255 Key : fileKey ,
256256 UploadId : uploadId ,
257257 Parts : formattedParts ,
Original file line number Diff line number Diff line change @@ -134,6 +134,8 @@ export default async function EmbedVideoPage(props: Props) {
134134 public : videos . public ,
135135 videoStartTime : videos . videoStartTime ,
136136 audioStartTime : videos . audioStartTime ,
137+ awsRegion : videos . awsRegion ,
138+ awsBucket : videos . awsBucket ,
137139 xStreamInfo : videos . xStreamInfo ,
138140 jobId : videos . jobId ,
139141 jobStatus : videos . jobStatus ,
Original file line number Diff line number Diff line change @@ -274,6 +274,8 @@ export default async function ShareVideoPage(props: Props) {
274274 public : videos . public ,
275275 videoStartTime : videos . videoStartTime ,
276276 audioStartTime : videos . audioStartTime ,
277+ awsRegion : videos . awsRegion ,
278+ awsBucket : videos . awsBucket ,
277279 xStreamInfo : videos . xStreamInfo ,
278280 jobId : videos . jobId ,
279281 jobStatus : videos . jobStatus ,
You can’t perform that action at this time.
0 commit comments