This repository was archived by the owner on Jul 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ int main(int argc, char *argv[]) {
2121 int thread_num = 1 ;
2222 std::string host = " 127.0.0.1" ;
2323 int port = 3928 ;
24+ std::string uploads_folder_path;
2425
2526 // Number of nitro threads
2627 if (argc > 1 ) {
@@ -37,6 +38,11 @@ int main(int argc, char *argv[]) {
3738 port = std::atoi (argv[3 ]); // Convert string argument to int
3839 }
3940
41+ // Uploads folder path
42+ if (argc > 4 ) {
43+ uploads_folder_path = argv[4 ];
44+ }
45+
4046 int logical_cores = std::thread::hardware_concurrency ();
4147 int drogon_thread_num = std::max (thread_num, logical_cores);
4248 nitro_utils::nitro_logo ();
@@ -49,6 +55,10 @@ int main(int argc, char *argv[]) {
4955 LOG_INFO << " Please load your model" ;
5056 drogon::app ().addListener (host, port);
5157 drogon::app ().setThreadNum (drogon_thread_num);
58+ if (!uploads_folder_path.empty ()) {
59+ LOG_INFO << " Drogon uploads folder is at: " << uploads_folder_path;
60+ drogon::app ().setUploadPath (uploads_folder_path);
61+ }
5262 LOG_INFO << " Number of thread is:" << drogon::app ().getThreadNum ();
5363
5464 drogon::app ().run ();
You can’t perform that action at this time.
0 commit comments