public async Task <IActionResult> Upload() { //这里一定要formFiles这个参数,不然Request.Form.Files就获取不到了(后来发现有时可以有时不行,是.netcore的bug?) //发现有的时候name必须为“file”才可以,其他的就不行了 //后来发现都不是 只是调试的时候过不了而已 return(Json(await serverUpload.Upload(this.Request))); }
/// <summary> /// Sends the two pictures taken to the quick stereo server for processing /// This function is called when the user clicks on the "Quick stereo server" button after having taken the two pictures /// </summary> public void SendToQuickStereoServer() { GameObject obj = (GameObject)Instantiate(Resources.Load("Prefabs/UploadServer")); _uploadServer = obj.GetComponent <UploadServer>(); _uploadServer.SetImages(_firstPicTexture, _secPicTexture); _uploadServer.ResetSuccess(); _uploadServer.Upload(); _uploaded = true; }