Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify if file is too big #186

Open
notPlancha opened this issue May 23, 2024 · 0 comments
Open

Notify if file is too big #186

notPlancha opened this issue May 23, 2024 · 0 comments

Comments

@notPlancha
Copy link

Hi, I've been using the tool and it's great, however not being able to parse big jsons has been a pain. I looked at the code and removing the maxSize: 1024 * 1024 * 1 line or pasting the big json breaks on JSON.parse for some reason (related: #182). However I think it would be useful for users to be notified that the json isn't being processed when dragging and dropping or selecting the json.

This seems possible to do with useDropzone on DragAndDropForm.tsx:

const { getRootProps, getInputProps, isDragActive } = useDropzone({
  onDropAccepted: onDrop,
  onDropRejected: (fileRejections) => {
    alert("File rejected: " + fileRejections[0].errors[0].message)
    console.log(fileRejections);
  },
  ...
});

I'm using alert just as an example, but this alone would improve feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant