Plans from $25/month
This lesson is for members. Join us?
Subscribe now and get immediate access to this course, 30 more and all future Vue.js courses!
Validate File Upload Size
In this lesson, learn how to validate a file upload’s size. By doing a little simple math we can convert megabytes to bytes and compare a MAX_FILE_SIZE with a File object’s size property and show a message to the user for files that fail the test.