Upload File: Multipart-formdata

Thanks @RicardoE105

Yes I defined axios as follows:

 docker run -it --rm   --name n8n   -p 5678:5678 -e NODE_FUNCTION_ALLOW_EXTERNAL=axios,request-promise-native,form-data,fs,request  -v ~/.n8n:/root/.n8n   n8nio/n8n   n8n start --tunnel

It still fails though not with a complaint about axios, but in the sample code below, even the echo service does not reach the console.log for success or error.

const axios = require('axios');

(async () => {
  try {
    const response = await axios.get('https://jsonplaceholder.typicode.com/todos/1')
    console.log(response.data.url);
    console.log(response.data.explanation);
    return [{ json: {'value':'success'} }] 
  } catch (error) {
    console.log(error.response.body);
    return [{ json: {'value':'error'} }] 
  }
})();

So whilst the function executes, there is no error raised or console.log. I’m trying to understand why it doesn’t execute the axios calls. Recreated it with this ‘request’ example as well, but similar behaviour.

var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://jsonplaceholder.typicode.com/todos/1',
  'headers': {
  }
};
await request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log('Does not reach this part');
  console.log(response.body);
  return [{ json: {} }] 
});