Select to view content in your preferred language

AttachmentEditor - How to restrict certain file types and file sizes that get uploaded

994
1
04-25-2016 09:15 AM
jasonwriter
Occasional Contributor


How would I check the file being uploaded with the attachmentEditor for size and type before it gets saved to the database.

0 Kudos
1 Reply
SteveCole
Honored Contributor

I haven't done this but you might be able to use HTML 5's File API to determine the size of the file being submitted. I'm guessing you would do this evaluation in one of the AttachmentEditor's events and then cancel the event if the file is too big?

Here's another link.

Steve

0 Kudos