|
@@ -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)
|
|
|
}
|