refactor(FE): Increase file upload limit to 5 MB

This commit is contained in:
rstubryan
2026-01-08 12:40:35 +07:00
parent d2781b0a89
commit cb62416552
2 changed files with 4 additions and 4 deletions
@@ -24,9 +24,9 @@ type UniformityFormSchemaType = {
}; };
const FileSchema = Yup.mixed<File>() const FileSchema = Yup.mixed<File>()
.test('documentSize', 'Ukuran file maksimal 2 MB', (value): boolean => { .test('documentSize', 'Ukuran file maksimal 5 MB', (value): boolean => {
if (!value) return true; if (!value) return true;
if (value instanceof File) return value.size <= 2 * 1024 * 1024; if (value instanceof File) return value.size <= 5 * 1024 * 1024;
return false; return false;
}) })
.test('documentType', 'Format file harus Excel', (value): boolean => { .test('documentType', 'Format file harus Excel', (value): boolean => {
@@ -358,8 +358,8 @@ const UniformityForm = ({
return; return;
} }
if (document.size > 2 * 1024 * 1024) { if (document.size > 5 * 1024 * 1024) {
toast.error(`Ukuran file ${document.name} maksimal 2 MB!`); toast.error(`Ukuran file ${document.name} maksimal 5 MB!`);
return; return;
} }