upload log functions
@@ -50,6 +50,25 @@ string exec(string command) {
return result;
}
+void upload_file(){
+ std::string command = "curl --include --request POST https://flightlessmango.com/logs -F 'log[game_id]=26506' -F 'log[user_id]=176' -F 'attachment=true' -A 'mangohud' ";
+ command += " -F 'log[uploads][]=@" + logFiles.back() + "'";
+
+ command += " | grep Location | cut -c11-";
+ std::string url = exec(command);
+ exec("xdg-open " + url);
+}
+
+void upload_files(){
+ std::string command = "curl --include --request POST https://flightlessmango.com/logs -F 'log[game_id]=26506' -F 'log[user_id]=176' -F 'attachment=true' -A 'mangohud' ";
+ for (auto& file : logFiles)
+ command += " -F 'log[uploads][]=@" + file + "'";
+
+ command += " | grep Location | cut -c11-";
+ std::string url = exec(command);
+ exec("xdg-open " + url);
+}
+
void writeFile(string filename){
logFiles.push_back(filename);
out.open(filename, ios::out | ios::app);
