How to upload file from "on form submission" to nextcloud

Describe the problem/error/question

I am unable to upload file from “on form submission” node to nextcloud

What is the error message (if any)?

The error says

This operation expects the node’s input data to contain a binary file ‘Swafoto_Timestamp’, but none was found [item 0]
Make sure that the previous node outputs a binary file

Workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.102.4
  • Database (default: SQLite): Postgre
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: linux

Hello @haqim007, welcome to community!
Anyway, can you show us the binary response?

Sorry, I am new to n8n. Can you give example of what binary response look like?

Your n8n workflow response, especially in form and create folder node

do you mean this one?

this one, and the binary file need to pass through the form submission, I think, you can connect your form trigger to the upload file node to make the Swafoto_Timestamp “detected” by Upload file node.

which part of my workflow that is wrong?

There’s nothing wrong with your workflow, sorry for the confusion.
Instead, you can use this for binary field, change Swafoto_Timestamp to {{ $('On form submission').item.binary.File.data }}
Or if it’s still error, you can add two more node

connect the Get file base64 input to create folder node, and connect the Convert to file node to the upload file node, and change the Swafoto_Timestamp binary field, to data

2 Likes

I have tried both solution you mention but still error. here is the workflow

Don’t add the nodes at there.
But here, before upload a file node

1 Like

It works!! Thanks!!

However, the image quality seems to be compressed.

Why does the order matter? I mean, if the nodes are after the form, the file upload node should still be able to access the data from the “convert to file” node, right?

I have same question with you, and “maybe”, my first solution can answer your question, i don’t know either…

1 Like