edit get files extensions query
This commit is contained in:
@@ -2,18 +2,17 @@ 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 { getAllowedFilesExtensions } from '@/app/actions/file-upload';
|
||||
|
||||
const ALLOWED_EXTENSIONS: string[] = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];
|
||||
const FILE_TYPE = "AUDIO"
|
||||
const MAX_SIZE = 1048576000;
|
||||
|
||||
export default function Page() {
|
||||
export default async function Page() {
|
||||
const FILE_TYPE = "audio";
|
||||
const { file_extension, max_file_size } = await getAllowedFilesExtensions(FILE_TYPE);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle title="audio-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 />
|
||||
</div>
|
||||
|
||||
@@ -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 /> */}
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
import ProtectionSummary from '@/app/ui/marking-page/protection-summary';
|
||||
import UploadSectionVideo from '@/app/ui/marking-page/upload-section-video';
|
||||
import FilesTable from '@/app/ui/dashboard/files-table';
|
||||
import PageTitle from '@/app/ui/page-title';
|
||||
import UploadSectionFile from '@/app/components/upload-section-file';
|
||||
import { getAllowedFilesExtensions } from '@/app/actions/file-upload';
|
||||
|
||||
const ALLOWED_EXTENSIONS: string[] = ['mp4', 'avi', 'webm', 'mkv', 'flv', 'wmv', 'mov'];
|
||||
const FILE_TYPE = "VIDEO"
|
||||
const MAX_SIZE = 1048576000;
|
||||
|
||||
export default function Page() {
|
||||
export default async function Page() {
|
||||
const FILE_TYPE = "video";
|
||||
const { file_extension, max_file_size } = await getAllowedFilesExtensions(FILE_TYPE);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PageTitle title="video-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 />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user