Scenario: Files exceeding 10MB are not handled, which could cause failures. If the file size exceeds 10MB throw an error in the response. Steps: In script add a function to check the size of the file. If the size of file is greater than 10 MB, then throw an error in the response.
Tag: File size
Validation of file size while uploading using JavaScript
We can implement file size validation by checking file size before uploading using Javascript. For eg: If we don’t allow uploading a file more than 4MB or less than 2MB, we could use validation to check that the file the user has chosen follows the given requirements and if it doesn’t, give them a message.… Continue reading Validation of file size while uploading using JavaScript