redone routes
This commit is contained in:
@@ -254,7 +254,17 @@ export default async function fileRoutes(server: FastifyInstance) {
|
||||
.from(files)
|
||||
.where(eq(files.tenant, tenantId))
|
||||
|
||||
const selected = rows.filter(f => ids.includes(f.id))
|
||||
const selected = rows.filter(f => ids.includes(f.id) && f.path)
|
||||
|
||||
console.log(selected)
|
||||
|
||||
const url = await getSignedUrl(
|
||||
s3,
|
||||
new GetObjectCommand({ Bucket: secrets.S3_BUCKET, Key: selected[0].path! }),
|
||||
{ expiresIn: 900 }
|
||||
)
|
||||
console.log(url)
|
||||
console.log(selected.filter(f => !f.path))
|
||||
|
||||
const output = await Promise.all(
|
||||
selected.map(async (file) => {
|
||||
|
||||
Reference in New Issue
Block a user