Add the ability to upload or download files

It would be cool if the users can upload some binary files from their browser, then start an workflow, process that file, generate a new document and then download it.

Implementing the download functionality might pretty straight forward:

Cool idea, @iosif! The only thing that I would be cautious of is to make sure that the file is brought into the system in a location that is isolated from the rest of the system and that the permissions are set so that you can not run that file.

It might be best to actually store the file as a blob in the database to keep it our of the file system and then load it into memory for processing.

Thoughts?

Yes interesting idea. Could be helpful for workflow development and one-off workflows. As @Tephlon mentioned should the files not be uploaded anywhere directly. As binary files in n8n get stored as base64, all that would have to be done is mainly frontend changes. The frontend would have to receive the file, and then “convert” it to base64. When “Execute Workflow” gets pressed it would then send that data with all the other one to the backend and would use it accordingly.

4 Likes