You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the latest stable version of restsharp (v110.2.0) to upload zip file to external link with name "Präsentation_Export" but after successful upload got "Pr�sentation_Export" from restsharp. I had done this work successfully working in version 105.2.3 but in v110.2.0 its not working.
Below is my controller method:
publicasyncTask<ApiResponse>UploadRequest(int?Id,IFormFilefile,stringAPIEndPoint,stringMethodType){ApiResponseresult=newApiResponse();try{varqueryString=newDictionary<string,string>(){{"access_token",AccessToken}};Uriuri=newUri(string.Format(BaseURL+APIEndPoint,string.Empty));varrequestUri=QueryHelpers.AddQueryString(uri.ToString(),queryString);usingvarmemoryStream=newMemoryStream();varclient=newRestClient(uri);awaitfile.CopyToAsync(memoryStream);//var restRequest = new RestRequest(requestUri, Method.Post);restRequest.AddHeader("Content-Type","multipart/form-data");varrestRequest=newRestRequest("https://tpsupport.tpondemand.com/",Method.Post).AddFile("attachment",memoryStream.ToArray(),file.FileName,file.ContentType,options:newFileParameterOptions{DisableFilenameEncoding=true});if(Id!=null){restRequest.AddParameter("generalId",Id.Value);}varresponse=awaitclient.ExecuteAsync(restRequest);stringresultContent=response.Content;if(response.IsSuccessStatusCode){result.Data=resultContent;}else{result.ExceptionObject=JsonConvert.DeserializeObject<Exception>(resultContent);}result.StatusCode=(int)response.StatusCode;returnresult;}catch(Exceptionex){result.ExceptionObject=ex;result.StatusCode=500;returnresult;}}
Desktop:
OS: Windows 11
.NET version 4.7.2
Version 110.2.0
Additional Information:
I'm uploading file with name "Präsentation_Export.zip", but after successful upload getting it with name "Pr�sentation_Export.zip".
The text was updated successfully, but these errors were encountered:
* Use encoded filename for FileNameStar (#2117)
* Remove the "fix" and add a test that shows it working
* Update the docs
* Fix the CsvHelper new version
I'm using the latest stable version of restsharp (v110.2.0) to upload zip file to external link with name "Präsentation_Export" but after successful upload got "Pr�sentation_Export" from restsharp. I had done this work successfully working in version 105.2.3 but in v110.2.0 its not working.
Below is my controller method:
Desktop:
OS: Windows 11
.NET version 4.7.2
Version 110.2.0
Additional Information:
I'm uploading file with name "Präsentation_Export.zip", but after successful upload getting it with name "Pr�sentation_Export.zip".
The text was updated successfully, but these errors were encountered: