-
Notifications
You must be signed in to change notification settings - Fork 38
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
Possible to have multiple post handler and generated pages? #40
Comments
Hi there, can you explain what you mean by multiple post handler? If you mean having multiple post endpoints, yes you can add multiple post route handlers, just make sure they have different route path patterns (the default is ofxHTTP/libs/ofxHTTP/include/ofx/HTTP/PostRoute.h Lines 52 to 54 in 2c1e399
Also, you can set valid content types in the PostRouteSettings .. e.g. ofxHTTP/libs/ofxHTTP/include/ofx/HTTP/BaseRoute.h Lines 115 to 120 in 2c1e399
If the upload content type is not included, it will be rejected. You can also set the upload redirect page here:
I'm not sure of the best return an "upload rejected" style message at the moment ... I think if you set a media type and the upload is incorrect, that will get you close ... but if you want to actually analyze the binary data using ofxLibmagic or something, that may need to be added as a feature. |
Thanks for your reply, Is it possible to print in a web response? Like I have a variable and I can see it's value on a web page? |
I'm also looking for an example to have multiple endpoints with their own handler. It's clear you can change the endpoint for one particular https://github.com/bakercp/ofxHTTP/blob/master/example_basic_server_post/src/ofApp.cpp#L17-L36 There seems to be an |
Hi,
Is it possible to have multiple post handler with this library?
Also I'd like show whether the file is acceptable. Can I have a dynamically generated upload.html?
Thanks
The text was updated successfully, but these errors were encountered: