edit get files extensions query

This commit is contained in:
smanylov
2025-12-25 15:31:24 +07:00
parent e0420fa6d3
commit e82d96a44c
6 changed files with 25 additions and 32 deletions
@@ -1,23 +1,18 @@
import ProtectionSummary from '@/app/ui/marking-page/protection-summary';
import FilesTable from '@/app/ui/dashboard/files-table';
import PageTitle from '@/app/ui/page-title';
import UploadSectionFile from '@/app/components/upload-section-file';
import FilesTable from '@/app/ui/dashboard/files-table';
import { getAllowedFilesExtensions } from '@/app/actions/file-upload';
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);
console.log(allowedFilesExtensions); */
const FILE_TYPE = "image";
const { file_extension, max_file_size } = await getAllowedFilesExtensions(FILE_TYPE);
return (
<div>
<PageTitle title="image-protection" />
<ProtectionSummary />
<UploadSectionFile fileType={FILE_TYPE} allowedExtensions={ALLOWED_EXTENSIONS} maxFileSize={MAX_SIZE} />
<UploadSectionFile fileType={FILE_TYPE} allowedExtensions={file_extension} maxFileSize={max_file_size} />
{/* <TestSection /> */}
<FilesTable />
{/* <ProtectedFilesTable /> */}