golf
golf copied to clipboard
WebSockets & File Upload
Both appears to not be possible - FormValue does not contain any data, if it is a file. For WebSockets, it would require to expose net/http handlers, which doesn't appear to be possible.
Is there any way to make either of those work inside Golf?
"Resolved" them by myself but will keep this issue open for other users until the documentation is updated. The *golf.Context exposes the reader as context.Request & write as context.Response. Those can be used to upgrade them for WebSockets.
For file uploads, either those direct inputs can be used or the FileReader.js to copy the file content into a hidden POST field.