-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.0.0-beta-13281
-
Fix Version/s: 1.0.0-beta-27220
-
Component/s: Automation API
- install Nuxeo 8.10
- install .NET client:
dotnet restore Restoring packages for /my/path/to/myprojet/myprojet.csproj... Installing System.Private.DataContractSerialization 4.1.1. Installing System.Runtime.Serialization.Xml 4.1.1. Installing System.Xml.XmlSerializer 4.0.11. Installing System.ComponentModel.EventBasedAsync 4.0.11. Installing WinInsider.System.Net.Http.Formatting 1.0.1. Installing NuxeoClient 1.0.0-beta-13281. Restore completed in 4,13 sec for /my/path/to/myprojet/myprojet.csproj.
- import attached 行动计划 27 Oct 2017.pdf file through drag and drop
- observe the Japanese encoding the filename is correctly encoded (see okScenario.png)
- now delete the document and purge the trash
- try again to import the file using the following piece .NET code (Nuxeo .NET client):
using System; using NuxeoClient; using NuxeoClient.Wrappers; namespace NXP_thing { class Program { private static async System.Threading.Tasks.Task makeRequest() { Client client = new Client("http://localhost:8080/nuxeo/", new Authorization("Administrator", "Administrator")); Document folder = client.DocumentFromPath("/default-domain/workspaces/testWorkspaceNXPTesting"); Uploader uploader = client.Uploader() .SetChunked(true) .SetChunkSize(1024); await uploader.AddFile("/my/path/to/行动计划 27 Oct 2017.pdf") .UploadFiles(); Documents documents = (Documents)await uploader.Operation("FileManager.Import") .SetContext("currentDocument", folder.Path) .Execute(); Console.WriteLine("inside the task"); } static void Main(string[] args) { Console.WriteLine("Hello World!"); System.Threading.Tasks.Task taskA = makeRequest(); taskA.Wait(); Console.WriteLine("after the wait"); } } }
- observe the filename is not UTF-8 encoded -> è¡å¨è®¡å 27 Oct 2017.pdf (see brokenScenario.png)
Both import methods use the FileManager.Import operation so it is very unlikely to be the culprit.
- causes
-
NETCLIENT-16 Invalid mime-type set using .NET client
- Resolved