Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 9391650

Browse files
authored
fix: remove uploads_folder_path (#996)
1 parent bdf8ecb commit 9391650

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

cortex-cpp/addon.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ static Napi::Env* s_env = nullptr;
2727
void start(const int port = 3929) {
2828
int thread_num = 1;
2929
std::string host = "127.0.0.1";
30-
std::string uploads_folder_path;
3130
int logical_cores = std::thread::hardware_concurrency();
3231
int drogon_thread_num = std::max(thread_num, logical_cores);
3332
#ifdef CORTEX_CPP_VERSION
@@ -40,10 +39,6 @@ void start(const int port = 3929) {
4039
LOG_INFO << "Please load your model";
4140
drogon::app().addListener(host, port);
4241
drogon::app().setThreadNum(drogon_thread_num);
43-
if (!uploads_folder_path.empty()) {
44-
LOG_INFO << "Drogon uploads folder is at: " << uploads_folder_path;
45-
drogon::app().setUploadPath(uploads_folder_path);
46-
}
4742
LOG_INFO << "Number of thread is:" << drogon::app().getThreadNum();
4843

4944
drogon::app().run();

cortex-cpp/main.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ int main(int argc, char* argv[]) {
4444
int thread_num = 1;
4545
std::string host = "127.0.0.1";
4646
int port = 3928;
47-
std::string uploads_folder_path;
4847

4948
// Number of cortex-cpp threads
5049
if (argc > 1) {
@@ -61,11 +60,6 @@ int main(int argc, char* argv[]) {
6160
port = std::atoi(argv[3]); // Convert string argument to int
6261
}
6362

64-
// Uploads folder path
65-
if (argc > 4) {
66-
uploads_folder_path = argv[4];
67-
}
68-
6963
int logical_cores = std::thread::hardware_concurrency();
7064
int drogon_thread_num = std::max(thread_num, logical_cores);
7165
// cortex_utils::nitro_logo();
@@ -79,10 +73,6 @@ int main(int argc, char* argv[]) {
7973
LOG_INFO << "Please load your model";
8074
drogon::app().addListener(host, port);
8175
drogon::app().setThreadNum(drogon_thread_num);
82-
if (!uploads_folder_path.empty()) {
83-
LOG_INFO << "Drogon uploads folder is at: " << uploads_folder_path;
84-
drogon::app().setUploadPath(uploads_folder_path);
85-
}
8676
LOG_INFO << "Number of thread is:" << drogon::app().getThreadNum();
8777

8878
drogon::app().run();

0 commit comments

Comments
 (0)