Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add "mode=base64" option to unixfile API #127
For files that can be represented as text, having a base64 mode to the unix file API allows an additional layer of security from accidentally interpreting plaintext as HTML.
Consider the file with contents "hello world" becomes "aGVsbG8gd29ybGQ="
"zlux-editor" should take advantage of this new option when it is ready.
Change existing unixfile API behavior, add a new optional "mode=raw" ... test that this is true via use of file-transfer-app
Should not consume excessive memory on either server or browser... so API should only stream, rather than read an entire file into memory
If you do not support binaries or large files, you should define cases in which the server rejects the request... HTTP 400 "File too large" for example. Files over 50 or 100MB are generally not something you want to look at, so that's a reasonable limit if you need to have one.
This is now in... we did responseType rather than mode. https://github.com/zowe/zlux-app-server/blob/master/doc/swagger/fileapi.yaml#L333