feat: bulk video uploads and S3 asset video support (#18)

Add multi-file drag-and-drop queues for project videos and the assets pane, and route asset video uploads through S3/R2 when direct Bunny uploads are disabled.
This commit is contained in:
yusufipk
2026-06-13 23:24:21 +02:00
parent 52ace1a1a8
commit 00124bc7c2
20 changed files with 1980 additions and 776 deletions
+12 -1
View File
@@ -47,7 +47,7 @@ export async function GET(
project: { select: projectSelect },
} as const;
const [versions, session] = await Promise.all([
const [versions, assets, session] = await Promise.all([
db.videoVersion.findMany({
where: { originalUrl },
take: 2,
@@ -56,6 +56,14 @@ export async function GET(
video: { select: videoSelect },
},
}),
db.videoAsset.findMany({
where: { sourceUrl: originalUrl },
take: 2,
select: {
id: true,
video: { select: videoSelect },
},
}),
auth(),
]);
@@ -63,6 +71,9 @@ export async function GET(
for (const version of versions) {
uniqueVideos.set(version.video.id, version.video);
}
for (const asset of assets) {
uniqueVideos.set(asset.video.id, asset.video);
}
if (uniqueVideos.size > 1) {
return apiErrors.forbidden('Access denied');
}