But I need to have different max sizes for videos and images for eg: images will have 10MB and videos will have 50MB, this does not seem possible with the ngf-max-size directive.
Is there a way this can be validated in the upload function? If we do not use the ngf-max-size, we will not have the invalidFiles. How will the error be triggered in that case?
I want to allow uploading media for a gallery, which includes a mix of videos and images.
Before uploading, I am validating the files for max size using the ngf-max-size directive. Below is the code I have for the same,
But I need to have different max sizes for videos and images for eg: images will have 10MB and videos will have 50MB, this does not seem possible with the ngf-max-size directive.
Is there a way this can be validated in the upload function? If we do not use the ngf-max-size, we will not have the invalidFiles. How will the error be triggered in that case?