Multy binary by item and node extract file don't see them

Hello this is my configuration :

i m on premise :

  • n8n version: : 1.64.3
  • Database (default: SQLite): Postgress
  • n8n EXECUTIONS_PROCESS setting (default: own, main): : default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: : Debian 12

So i got a node with multi item with multi binary files

So in input i got 7 item, with on ore two binary files, with différente name

but on extract file2 i can add only one input binaryField , so how i can get all binary files please ?

Hey @Issa2024 , you could split out all the binaries using Code node. Then you can access each one of them individually. Check out this post, FTP multiple files from n8n form.

2 Likes

Hello thanks i changed a little the code and that’s works :slight_smile:

// Récupère tous les items d'entrée
const allItems = $input.all();
let output = [];

// Parcourt chaque item et extrait les données binaires avec le nom du fichier
allItems.forEach(item => {
  const binaryData = item.binary;
  if (binaryData) {
    Object.keys(binaryData).forEach(key => {
      output.push({
        binary: { data: binaryData[key] },
        json: { fileName: binaryData[key].fileName }
      });
    });
  }
});

// Retourne la liste consolidée de tous les éléments binaires avec le nom du fichier
return output;

exctly what i want

thanks u :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.