I’m running n8n in a Docker container on my local machine. I have a basic automation that uses a webhook to receive data from an API POST request and then saves it using a file output node. The file gets saved to a folder in the container that maps to a directory on my host system. This workflow is supposed to handle image uploads from a web form and store them on my server.
Everything was working fine until I made some changes to the Docker setup (added an image processing library). Now I can’t get it back to working order and I’m stuck. I could start over completely but I’ve customized the installation quite a bit and I’m worried I won’t remember all the changes.
When I trigger the workflow through the API, it never completes and gives a 500 error back to the client. In the n8n interface, the execution shows as “running…” forever. The weird thing is that a file does get created in the target folder and it’s about the right size, but the image is corrupted and won’t open.
The logs show an error about moving binary data from a temp folder, but I can see the execution folder and file are actually there. What could be causing this issue and how can I debug it further?
Here’s my workflow setup:
{
"name": "save-form-image",
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [150, 300],
"id": "start-node-id"
},
{
"parameters": {
"filePath": "=/uploads/gallery/{{ $json.query.imageName }}.png",
"binaryPropertyName": "=fileData",
"options": {}
},
"name": "Save File",
"type": "n8n-nodes-base.writeBinaryFile",
"typeVersion": 1,
"position": [800, 280],
"id": "file-writer-node"
},
{
"parameters": {
"authentication": "headerAuth",
"httpMethod": "POST",
"path": "image-upload-handler",
"responseMode": "lastNode",
"options": {}
},
"name": "API Receiver",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [400, 280],
"webhookId": "webhook-uuid-here",
"id": "webhook-receiver-node"
}
],
"connections": {
"API Receiver": {
"main": [
[
{
"node": "Save File",
"type": "main",
"index": 0
}
]
]
}
},
"active": true
}