mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 17:46:06 +00:00
- 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
25 lines
699 B
TypeScript
25 lines
699 B
TypeScript
import { requireProjectAccessOrRedirect } from '@/lib/route-access';
|
|
import { isDirectFileUploadEnabled, isS3VideoUploadsEnabled } from '@/lib/feature-flags';
|
|
import NewVideoPageClient from './new-video-page-client';
|
|
|
|
interface NewVideoPageProps {
|
|
params: Promise<{ projectId: string }>;
|
|
}
|
|
|
|
export default async function NewVideoPage({ params }: NewVideoPageProps) {
|
|
const { projectId } = await params;
|
|
|
|
await requireProjectAccessOrRedirect({
|
|
projectId,
|
|
intent: 'manage',
|
|
});
|
|
|
|
return (
|
|
<NewVideoPageClient
|
|
projectId={projectId}
|
|
directUploadsEnabled={isDirectFileUploadEnabled()}
|
|
directUploadProvider={isS3VideoUploadsEnabled() ? 'r2' : 'bunny'}
|
|
/>
|
|
);
|
|
}
|