Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSockets & File Upload #29

Open
JamesCullum opened this issue Aug 23, 2017 · 1 comment
Open

WebSockets & File Upload #29

JamesCullum opened this issue Aug 23, 2017 · 1 comment

Comments

@JamesCullum
Copy link

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?

@JamesCullum
Copy link
Author

"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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant