瀏覽代碼

Added neuralnet binary (not tested)

tobychui 3 年之前
父節點
當前提交
b0b3079ded
共有 3 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      file_system.go
  2. 二進制
      system/neuralnet/darknet_darwin_amd64
  3. 二進制
      system/neuralnet/darknet_linux_amd64

+ 8 - 0
file_system.go

@@ -629,6 +629,9 @@ func system_fs_handleUpload(w http.ResponseWriter, r *http.Request) {
 
 	storeFilename := handler.Filename //Filename of the uploaded file
 
+	//Get request time
+	uploadStartTime := time.Now().UnixMilli()
+
 	//Update for Firefox 94.0.2 (x64) -> Now firefox put its relative path inside Content-Disposition -> filename
 	//Skip this handler logic if Firefox version is in between 84.0.2 to 94.0.2
 	bypassMetaCheck := compatibility.FirefoxBrowserVersionForBypassUploadMetaHeaderCheck(r.UserAgent())
@@ -750,6 +753,11 @@ func system_fs_handleUpload(w http.ResponseWriter, r *http.Request) {
 
 	//Do upload finishing stuff
 
+	//Add a delay to the complete message to make sure browser catch the return value
+	if time.Now().UnixMilli()-uploadStartTime < 100 {
+		//Sleep until at least 300 ms
+		time.Sleep(time.Duration(100 - (time.Now().UnixMilli() - uploadStartTime)))
+	}
 	//Completed
 	sendOK(w)
 }

二進制
system/neuralnet/darknet_darwin_amd64


二進制
system/neuralnet/darknet_linux_amd64