T
Typebot8mo ago
Rotivjr

Hi there. Is there any way to avoid/block some types of files when uploading via typebot?

I need to allow only pdf and docx to be send via typebot. Is it possible?
4 Replies
Baptiste
Baptiste8mo ago
Still needs to be implemented!
greenrhyno
greenrhyno8mo ago
I have code that checks after upload if its the type I want and if not, I instruct them to search for an online converter then loop back. Mine is images but concept is the same- check the file extension. function isValidType(ImageURL) { const fileExtension = ImageURL.includes('.') ? ImageURL.split('.').pop().toLowerCase() : 'FALSE'; return fileExtension; } // Example usage in Typebot return isValidType({{logoRaw}}) I run that then I have a conditional block that flows based on the result. Invalid types get conversion instructions then a button when they have the correct type.
Rotivjr
RotivjrOP8mo ago
Thanks guys! 👍

Did you find this page helpful?