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
@@ -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 /> */}