Closed reddigari closed 4 years ago
@reelmatt Great catch, both resolved by the last two commits.
@reelmatt your commit got it to execute properly, but the downloaded file was named download.csv
rather than the value in the global flow variable. Any ideas?
We had something like this earlier, adding the filename in the response like:
response['Content-Disposition'] = f"attachment; filename={f.name}"
I wasn't sure the best way to parse that on the front-end, so I just passed the filename in the header and used that directly.
That should work now, but feel free to tweak that as you see fit. In general, I think that's a lot cleaner/simpler than trying to re-derive the filename from the node.config
info on the front-end.
Any non-file parameters in the node configuration form have a checkbox indicating whether to override with a flow variable (if any exist). Checking the box disables the normal parameter input, and displays a dropdown to select the flow node to use as the override.
Currently no verification that the selected flow var has the same type as the option being overridden, but I think I'll handle that as I do local flow nodes tomorrow.
I've tested by overriding the
sep
option of ReadCsvNode to read a CSV where I swapped the commas for semicolons, and it works fine. There is a problem that @reelmatt is looking into where if you try to use a flow variable to override the WriteCsvNode output file, the server doesn't know how to construct the correct path.