NetBash icon indicating copy to clipboard operation
NetBash copied to clipboard

Add ability to redirect to file

Open phdesign opened this issue 14 years ago • 0 comments

Patch that adds the ability to redirect output to a file that the user is prompted to download.

Usage:

help > help.txt length test string > length.txt

Implemented export as a separate action / url to call that returns type application/octet-stream rather than json. Javascript recognised redirect symbol '>' and instead of performing an ajax call, sends a form submission to the netbash-export url.

Known issues

The problem with this implementation is that if an error occurs the whole page is replaced by the error. This could be overcome by using an iframe for the down, then retrieve any error messages to display back in the console.

phdesign avatar Jan 26 '12 22:01 phdesign