From f5b13a1738a6888e216b9931daf7d000586043d7 Mon Sep 17 00:00:00 2001 From: diced-tomato Date: Fri, 30 Oct 2020 11:04:33 -0700 Subject: [PATCH 1/2] add 1gb file size --- src/pages/dash/upload.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/dash/upload.tsx b/src/pages/dash/upload.tsx index 6f91732c..77d865ca 100644 --- a/src/pages/dash/upload.tsx +++ b/src/pages/dash/upload.tsx @@ -76,6 +76,7 @@ export default function Upload() { acceptedFiles={['image/*']} dropzoneText={'Drag an image or click to upload an image.'} onChange={f => setFiles(f)} + maxFileSize={1073741824} // 1gb in byte /> From 79146cb0e249c3fe883e74b199528cb42193e2f1 Mon Sep 17 00:00:00 2001 From: diced-tomato Date: Fri, 30 Oct 2020 11:39:07 -0700 Subject: [PATCH 2/2] fix no images --- src/pages/dash/images.tsx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/pages/dash/images.tsx b/src/pages/dash/images.tsx index 5c18343c..26bc06bc 100644 --- a/src/pages/dash/images.tsx +++ b/src/pages/dash/images.tsx @@ -55,8 +55,8 @@ export default function Images({ config }) { const getChunkedImages = async () => { const c = await (await fetch('/api/images/chunk')).json(); if (!c.error) { - setChunks([]); - return []; + setChunks(c); + return c; } return []; }; @@ -136,18 +136,18 @@ export default function Images({ config }) { ) : ( - - - + + + + - - )} + )} ) : null}