-
Type: Bug
-
Status: Resolved
-
Priority: Critical
-
Resolution: Fixed
-
Affects Version/s: 1.0.0-beta-44070
-
Fix Version/s: 1.0.0-beta-64050
-
Component/s: Core
-
Tags:
-
Backlog priority:800
-
Sprint:YO LETS DO THIS MAYBE, UI - 2021-04
Using the following client code in VS 2019 (DotNet 4.6.1 as a target) and .Net NuxelClient 1.0.0-beta-44070, the filename property is not displayed correctly in Nuxeo due to a wrong UTF-8 conversion
.Net C# code
using System; using NuxeoClient; using NuxeoClient.Wrappers; namespace myApp { class Program { static async System.Threading.Tasks.Task Main(string[] args) { Console.WriteLine("Hello World!"); Console.WriteLine("The current time is " + DateTime.Now); Client client = new Client("http://localhost:8080/nuxeo/", new Authorization("Administrator", "Administrator")); Console.WriteLine(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); Blob blobV = Blob.FromFile(".\\DSC00388.JPG") .SetFilename("ÅÄÖåäö") //.SetFilename("AAOaao") //.SetFilename("éèçàùµ") .SetMimeType("image/jpg"); Console.WriteLine(blobV); // Do any async anything you need here without worry var myVisningsFil = await client.Operation("Blob.AttachOnDocument") .SetParameter("document", "4779be1d-9dea-4e87-a98a-dfba92e04985") .SetParameter("xpath", "file:content") .SetInput(blobV) .Execute(); } } }
Suggested fix:
in Client.cs, line 581:
https://github.com/nuxeo/nuxeo-dotnet-client/blob/master/src/NuxeoClient/Client.cs#L581 changing:
FileName = blob.Filename
into
FileNameStar = blob.Filename
fixes the filename issue in Nuxeo in the environment in which I reproduce the issue.
- Is referenced in