Files
OpenFrame/app/(dashboard)/projects/[projectId]/videos/[videoId]/page.tsx
T
yusufipk 4bf6e821af feat: enable S3 video uploads and update related configurations
- Added support for self-hosted S3 video uploads with new environment variables: OPENFRAME_ENABLE_S3_VIDEO_UPLOADS and OPENFRAME_MAX_VIDEO_UPLOAD_BYTES.
- Updated .env.example and .env.docker.example to reflect new configuration options.
- Enhanced Content Security Policy to include origins for S3-compatible storage.
- Updated dependencies for AWS SDK to support new features.
- Refactored upload logic to accommodate both Bunny and S3 upload providers.
- Updated documentation to clarify the usage of direct uploads and S3 configurations.
- Closes #11
2026-05-27 17:04:39 +02:00

32 lines
917 B
TypeScript

import { VideoPageContent } from '@/components/video-page-content';
import { auth } from '@/lib/auth';
import { isDirectFileUploadEnabled, isS3VideoUploadsEnabled } from '@/lib/feature-flags';
import { requireVideoProjectAccessOrRedirect } from '@/lib/route-access';
interface VideoPageProps {
params: Promise<{ projectId: string; videoId: string }>;
}
export default async function VideoPage({ params }: VideoPageProps) {
const { projectId, videoId } = await params;
const session = await auth();
await requireVideoProjectAccessOrRedirect({
projectId,
videoId,
userId: session?.user?.id,
intent: 'view',
allowPublicView: true,
});
return (
<VideoPageContent
mode="dashboard"
videoId={videoId}
projectId={projectId}
directUploadsEnabled={isDirectFileUploadEnabled()}
directUploadProvider={isS3VideoUploadsEnabled() ? 'r2' : 'bunny'}
/>
);
}