I’m running n8n in a Docker container on my local machine. I have a basic automation that takes data from a webhook trigger and saves it as a file using a binary file writer node. The binary writer saves files to a container folder that’s mapped to my local server directory.
The workflow is designed to receive image uploads from a web form and store them on my server. Everything was working fine until I made some changes to the Docker container (added an image metadata parsing library). Now I’m stuck and can’t figure out how to fix it.
When the automation runs, it never finishes and shows a 500 error to the API request. In the n8n interface, the execution stays in “running…” status forever. The weird thing is that a file does get created in the target folder with the right size, but it’s corrupted and won’t open as an image.
The logs show an error about moving binary data from the temp folder to the final location, but the file is actually there. I’ve tried everything I can think of but I’m out of ideas. How can I debug this issue further? What might be causing this problem?
Here’s my workflow setup:
{
"name": "save-photo-upload",
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [250, 400],
"id": "start-node-123"
},
{
"parameters": {
"fileName": "=/uploads/images/{{ $json.query.imageName }}.png",
"dataPropertyName": "=fileData",
"options": {}
},
"name": "Save File",
"type": "n8n-nodes-base.writeBinaryFile",
"typeVersion": 1,
"position": [800, 400],
"id": "file-writer-456"
},
{
"parameters": {
"authentication": "headerAuth",
"httpMethod": "POST",
"path": "image-upload-endpoint",
"responseMode": "lastNode",
"options": {}
},
"name": "HTTP Trigger",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [500, 400],
"webhookId": "upload-webhook-789",
"id": "webhook-node-abc"
}
],
"connections": {
"HTTP Trigger": {
"main": [[
{
"node": "Save File",
"type": "main",
"index": 0
}
]]
}
},
"active": true
}