What's the best way to enforce file size limits on images? #4780
Unanswered
julillermo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I added a button to export the Delta contents of the Quill editor. I'm going to then store a modified Delta JSON data on a server for retrieval later. Before forwarding to the server, I'm going to parse the Delta JSON data for image input, upload the images, and then replace their original location in the Delta JSON.
Elsewhere in my site, I have file size restrictions when uploading images to avoid overloading my server. I would also want to limit the file size when uploading images that come from the Quill editor.
Is there a way to enforce a file size limit on images as they enter the Quill editor?
Currently, I'm seeing the following three events that allows inserting images into the Quill editor:
At the moment, I'm thinking the toolbar scenario is the most straightforward to intervene in and apply a restriction. I'm not sure how to handle the paste and drag-and-drop scenarios. Are there events or other ways to intervene for these?
Beta Was this translation helpful? Give feedback.
All reactions