How to Read/Write local disk?
-
Hi.
In n8n, often one needs to access (read/write) host filesystem (from inside n8n).
The way it's usually implemented, via Docker, is to map a volume on the host system to a directory in the n8n container fs.
Example:
- /app/data/files:/home/cloudron/files
But i can't seem to find a way to implement this mapping.
-
@shrey said in How to Read/Write local disk?:
Hi.
In n8n, often one needs to access (read/write) host filesystem (from inside n8n).
The way it's usually implemented, via Docker, is to map a volume on the host system to a directory in the n8n container fs.
Example:
- /app/data/files:/home/cloudron/files
But i can't seem to find a way to implement this mapping.
It seems that the entire host fs is available via direct path:
/app/...
-
@shrey said in How to Read/Write local disk?:
Hi.
In n8n, often one needs to access (read/write) host filesystem (from inside n8n).
The way it's usually implemented, via Docker, is to map a volume on the host system to a directory in the n8n container fs.
Example:
- /app/data/files:/home/cloudron/files
But i can't seem to find a way to implement this mapping.
It seems that the entire host fs is available via direct path:
/app/...
-
-
Figured it out.
Note: I manually created a
n8n-uploads
folder in my case.In n8n, using the "Read/Write Files from Disk" action:
File Path and Name
:/app/data/n8n-uploads/file.jpeg
/app/data/file.jpeg
works out of the box, but I wanted to store all my files in the same folder.Here is a video:
https://www.loom.com/share/5e6bccdbd19842a489cc10f90ea871d4 -
@AmbroiseUnly
Great, this helps me finally