If been wondering if there’s an easy way to filter binary files based on their size. I’m currently building something like an “archive” for a gmail account, and upload all attachments to Google Drive.
Since there are a lot of low-quality profile pictures or e-mail logos uploaded too, I wanted to ask if it’s possible to filter out every file that is less than a specific size (in my casw 20kb).
Hi @one_juru, this isn’t straightforward but should be possible. You can obtain the size of a file by reading the buffer length. Once you have this information available, you could then use an IF node to filer by size like so:
Hey @Jehu . I am also stumped. I must be missing something… If I use merge to bring the binary data and the buffer length and pass it onto the http post request (In my case passing it on to OpenAI node for transcribing), I am struggling to reference the binary data - any ideas? It also doesn’t work if I remove the if statement. but if I pass the Read/Write Files from Disk directly to the OpenAI node, then it works