Skip to content

Conversation

@easydigi
Copy link
Contributor

@easydigi easydigi commented May 8, 2025

Summary

When configuring N8N to store binary data in S3 (Minio), if the ​​Convert to File​​ node uses a filename containing ​​non-ASCII characters​​ and directly stores it in the S3 metadata without encoding, an error may occur. To avoid this issue, encode the filename using ​​encodeURIComponent​​ before saving it to the S3 metadata. This ensures proper handling of special characters in filenames.

NodeOperationError: Request to S3 failed at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+client-sts@3.666.0_@aws-sdk+credential_cd69f0ca660e18ad06c7da030f762d87/node_modules/n8n-nodes-base/dist/nodes/Files/ConvertToFile/actions/toBinary.operation.js:162:13) at processTicksAndRejections (node:internal/process/task_queues:95:5) at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+client-sts@3.666.0_@aws-sdk+credential_cd69f0ca660e18ad06c7da030f762d87/node_modules/n8n-nodes-base/dist/nodes/Files/ConvertToFile/ConvertToFile.node.js:143:20) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_openai@4.78.1_encoding@0.1.13_zod@3.24.1_/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:689:27) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_openai@4.78.1_encoding@0.1.13_zod@3.24.1_/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:923:51 at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_openai@4.78.1_encoding@0.1.13_zod@3.24.1_/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:1259:20

After repair:

2842cafadc1ee1292e77901eee1d9e8c

Workflow for verification:

{
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "0e7875e9-f5f8-4e1e-8b74-d4cd85af89ea",
      "name": "When clicking ‘Test workflow’"
    },
    {
      "parameters": {
        "action": "generate",
        "encodingType": "base64"
      },
      "type": "n8n-nodes-base.crypto",
      "typeVersion": 1,
      "position": [
        220,
        0
      ],
      "id": "4747f79f-6568-4e5c-8ddf-6407c6ae09cf",
      "name": "Crypto"
    },
    {
      "parameters": {
        "operation": "toBinary",
        "sourceProperty": "data",
        "options": {
          "fileName": "中文名测试.dat"
        }
      },
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        440,
        0
      ],
      "id": "f9014d2b-cab0-478e-aec5-b0d48d99977a",
      "name": "Convert to File"
    },
    {
      "parameters": {
        "operation": "binaryToPropery",
        "options": {}
      },
      "type": "n8n-nodes-base.extractFromFile",
      "typeVersion": 1,
      "position": [
        740,
        -20
      ],
      "id": "f6690c62-a1e3-4ea9-acbc-b2e20604797b",
      "name": "Extract from File"
    }
  ],
  "connections": {
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Crypto",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crypto": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

@CLAassistant
Copy link

CLAassistant commented May 8, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mrge found 4 issues across 17 files. Review them in mrge.io

@easydigi easydigi changed the base branch from master to release/1.92.1 May 8, 2025 08:43
@n8n-assistant n8n-assistant bot added community Authored by a community member core Enhancement outside /nodes-base and /editor-ui in linear Issue or PR has been created in Linear for internal review labels May 8, 2025
@Joffcom
Copy link
Member

Joffcom commented May 8, 2025

Hey @easydigi,

Thanks for the PR, We have created "GHC-1902" as the internal reference to get this reviewed.

One of us will be in touch if there are any changes needed, in most cases this is normally within a couple of weeks but it depends on the current workload of the team.

@ivov
Copy link
Member

ivov commented Jul 16, 2025

@easydigi Thank you very much for your contribution. I added a test and reopened against master, preserving your commit.

#17383

@ivov ivov closed this Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Authored by a community member core Enhancement outside /nodes-base and /editor-ui in linear Issue or PR has been created in Linear for internal review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants