Hi! I have a problem: can’t read and can’t write binary files. Maybe this is the same issue, maybe different.
Reading. So I created the local-files folder on my server, according to the Installation process, and put there picture.jpg file. I try to read it with Read binary file. This is my path:
This is the error message:
Writing. I use the workflow for writing files, this is the path:
The errors look different, but seem the same. I even gave all the possible permission to the folder on my server (which I think I haven’t been asked to do).
And you are saying that this ../local-files folder is equal to /local-files on the instance or docker container which runs n8n? Because if yes, then it has to work. So I would assume that is not the case.
The last two paragraphs of the 5. Create docker-compose file step talks about how to setup n8n to use the Write Binary File node. Did you follow those steps?
Yeah. Initially I didn’t add the “files” line, but when started working with binaries, I added the line, stopped , removed and started again docker containers.
Thank you.
By the way, does it mean that for reading and writing I shoud use this fixed folder? I mean, n8n seems not seeing any other folders (just subfolders) besides “files” (“local-files” on server).
If you run n8n in Docker then it is totally different to your “host system”. It will only get access to the files you give it access to (via that one line). You can add as many of them as you want and you can name them however you want. But if you want that you can access them from your host system you have to add a volume mount.
Btw. looking at your screenshot from above does it look like you actually have to use /files inside of n8n instead of /local-files because you tell Docker to mount /local-files (host system) to `/files (inside of Docker and so n8n). Again you can choose whatever names you want.
I got it, thank you. Just to mention the folders I need for the docker-compose.
As far as naming difference is concerned, I took them from the official page. So my “server” and “n8n” names for folders are different. Maybe it needs to be changed in the guide.
Yes, this is what @RicardoE105 pointed at and finally helped me. I remember last time I read there was no this explanation and I didn’t get how it works.
Yes, we are constantly improving the documentation. So quite possible that it got improved between the time you checked it last. Glad that it works now.