file upload update

This commit is contained in:
smanylov
2025-12-24 21:36:59 +07:00
parent fe77b4ad36
commit 87b8d68f41
9 changed files with 156 additions and 74 deletions
@@ -1,16 +1,16 @@
import ProtectionSummary from '@/app/ui/marking-page/protection-summary';
import TestSection from '@/app/ui/marking-page/test-section';
import FilesTable from '@/app/ui/dashboard/files-table';
import {useTranslations} from 'next-intl';
import PageTitle from '@/app/ui/page-title';
const ALLOWED_EXTENSIONS: string[] = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];
const FILE_TYPE = "VIDEO"
const MAX_SIZE = 1048576000;
export default function Page() {
const t = useTranslations('Global');
return (
<div>
<div className="page-title">
<h1>{t('audio-protection')}</h1>
</div>
<PageTitle title="audio-protection" />
<ProtectionSummary />
{/* <TestSection /> */}
<FilesTable />
@@ -2,21 +2,22 @@ import ProtectionSummary from '@/app/ui/marking-page/protection-summary';
import PageTitle from '@/app/ui/page-title';
import UploadSectionFile from '@/app/components/upload-section-file';
import FilesTable from '@/app/ui/dashboard/files-table';
import { FileExtension } from '@/app/actions/definitions';
import { getAllowedFilesExtensions } from '@/app/actions/file-upload';
const ALLOWED_EXTENSIONS: FileExtension[] = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];
const ALLOWED_EXTENSIONS: string[] = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];
const FILE_TYPE = "IMAGE"
const MAX_SIZE = 1048576000;
export default async function Page() {
/* const allowedFilesExtensions = await getAllowedFilesExtensions(FILE_TYPE);
console.log(allowedFilesExtensions); */
/* const allowedFilesExtensions = await getAllowedFilesExtensions(FILE_TYPE);
console.log(allowedFilesExtensions);
console.log(allowedFilesExtensions); */
return (
<div>
<PageTitle title="image-protection" />
<ProtectionSummary />
<UploadSectionFile fileType={FILE_TYPE} allowedExtensions={ALLOWED_EXTENSIONS} />
<UploadSectionFile fileType={FILE_TYPE} allowedExtensions={ALLOWED_EXTENSIONS} maxFileSize={MAX_SIZE} />
{/* <TestSection /> */}
<FilesTable />
{/* <ProtectedFilesTable /> */}
@@ -1,20 +1,20 @@
import ProtectionSummary from '@/app/ui/marking-page/protection-summary';
import TestSection from '@/app/ui/marking-page/test-section';
import UploadSectionVideo from '@/app/ui/marking-page/upload-section-video';
import FilesTable from '@/app/ui/dashboard/files-table';
import {useTranslations} from 'next-intl';
import PageTitle from '@/app/ui/page-title';
import UploadSectionFile from '@/app/components/upload-section-file';
const ALLOWED_EXTENSIONS: string[] = ['mp4', 'avi', 'webm', 'mkv', 'flv', 'wmv', 'mov'];
const FILE_TYPE = "VIDEO"
const MAX_SIZE = 1048576000;
export default function Page() {
const t = useTranslations('Global');
return (
<div>
<div className="page-title">
<h1>{t('video-protection')}</h1>
</div>
<PageTitle title="video-protection" />
<ProtectionSummary />
<UploadSectionVideo />
<UploadSectionFile fileType={FILE_TYPE} allowedExtensions={ALLOWED_EXTENSIONS} maxFileSize={MAX_SIZE} />
{/* <TestSection /> */}
<FilesTable />
</div>