How to validate attached files

I’m attaching files from bot, How to validate specified files (SSL Certificates).

Please reply on this ASAP.

Thanks.

How to validate extension of the file?

Please reply to this ASAP.

Thank you!!!

Please review the chatwindow.js of webSDK at “allowedFileTypes”.

I have a requirement with diff entities with diff file types.

Case 1 : If the user will be asked for upload the .txt he can only upload text file with entity node ‘textFile’
Case 2 : If the user will be asked for upload the .xsd he can only upload Xsd file with entity node ‘xsdFile’
Case 3 : If the user will be asked for upload the .cer he can only upload Certificate with entity node ‘Cerfile’.

Each entity has diff type of input file. How to validate this with each entity level?

Thank you.

Please update on this.

Response was already provided.