From 3762bbb47d0781f54bb15957787800b8a4738768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Hrub=C3=BD?= Date: Wed, 27 May 2020 17:40:31 +0200 Subject: [PATCH] Created _Footer (markdown) --- _Footer.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 _Footer.md diff --git a/_Footer.md b/_Footer.md new file mode 100644 index 0000000..600fb11 --- /dev/null +++ b/_Footer.md @@ -0,0 +1,30 @@ +Vitrix Software +We've created a library that simplifies HTTP server creation with support of websocket, authentication and authorization. +[Repository link](https://bitbucket.org/palmapp/vitrix.libs/src/master/spiderlib/src/) + +`class print_file_upload_processor : public spider::file_upload_processor +{ + public: + int handle_uploaded_files(spider::request &request, const std::vector &parts) final + { + for (auto &part : parts) + LOG(INFO) << "uploaded part " << part.content_disposition.name << " " + << part.temp_file_path; + + return 200; + } +}; + +int main(int argc, const char *argv[]) +{ + using namespace spider; + print_file_upload_processor fup{}; + auto thread_pool_ptr = std::make_shared(16); + + auto app_handle = run_spider_app("uploads", {argc, argv}, [&](init_context &ctx, app &my_app) { + on_url(my_app, "/", ctx.io_context, fup, "uploads", thread_pool_ptr); + }); + + app_handle->wait(); +} +` \ No newline at end of file