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
Still needs to be implemented!
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.Thanks guys! 👍