Mo stuff
This commit is contained in:
@@ -37,7 +37,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
|
||||
settings.no_sandbox = true;
|
||||
settings.remote_debugging_port = 8080;
|
||||
#ifdef _DEBUG
|
||||
settings.single_process = true;
|
||||
settings.single_process = false;
|
||||
#endif
|
||||
CefInitialize(mainArgs, settings, app, nullptr);
|
||||
|
||||
|
@@ -11,11 +11,11 @@ using namespace Sia::Api;
|
||||
#define TABLE_CREATE L"create table if not exists %s (%s);"
|
||||
#define UPLOAD_TABLE L"upload_table"
|
||||
#define UPLOAD_TABLE_COLUMNS L"id integer primary key autoincrement, sia_path text unique not null, file_path text unique not null, sd_file_path text unique not null, status integer not null"
|
||||
#define QUERY_STATUS "select id, sia_path, file_path, sd_file_path, status from upload_table where sia_path=@sia_path order by id desc limit 1;"
|
||||
#define QUERY_UPLOADS_BY_STATUS "select id, sia_path, status from upload_table where status=@status order by id desc limit 1;"
|
||||
#define QUERY_UPLOADS_BY_2_STATUS "select id, sia_path, status from upload_table where (status=@status1 or status=@status2) order by id desc limit 1;"
|
||||
#define QUERY_UPLOADS_BY_SIA_PATH "select id, sia_path, status from upload_table where sia_path=@sia_path order by id desc limit 1;"
|
||||
#define QUERY_UPLOADS_BY_SIA_PATH_AND_2_STATUS "select id, sia_path, file_path, sd_file_path, status from upload_table where sia_path=@sia_path and (status=@status1 or status=@status2) order by id desc limit 1;"
|
||||
#define QUERY_STATUS "select * from upload_table where sia_path=@sia_path order by id desc limit 1;"
|
||||
#define QUERY_UPLOADS_BY_STATUS "select * from upload_table where status=@status order by id desc limit 1;"
|
||||
#define QUERY_UPLOADS_BY_2_STATUS "select * from upload_table where (status=@status1 or status=@status2) order by id desc limit 1;"
|
||||
#define QUERY_UPLOADS_BY_SIA_PATH "select * from upload_table where sia_path=@sia_path order by id desc limit 1;"
|
||||
#define QUERY_UPLOADS_BY_SIA_PATH_AND_2_STATUS "select * from upload_table where sia_path=@sia_path and (status=@status1 or status=@status2) order by id desc limit 1;"
|
||||
#define UPDATE_STATUS "update upload_table set status=@status where sia_path=@sia_path;"
|
||||
#define INSERT_UPLOAD "insert into upload_table (sia_path, status, file_path, sd_file_path) values (@sia_path, @status, @file_path, @sd_file_path);"
|
||||
#define DELETE_UPLOAD "delete from upload_table where sia_path=@sia_path;"
|
||||
@@ -504,7 +504,7 @@ void CUploadManager::AutoThreadCallback(const CSiaCurl& siaCurl, CSiaDriveConfig
|
||||
|
||||
// TODO Validate response
|
||||
json response;
|
||||
SiaCurlError cerror = siaCurl.Post(SString(L"/renter/upload") + siaPath, { {L"source", filePath} }, response);
|
||||
SiaCurlError cerror = siaCurl.Post(SString(L"/renter/upload/") + siaPath, { {L"source", filePath} }, response);
|
||||
if (ApiSuccess(cerror))
|
||||
{
|
||||
SET_STATUS(UploadStatus::Uploading, UploadToSiaStarted, ModifyUploadStatusFailed)
|
||||
|
Reference in New Issue
Block a user