SenseNet / sn-client-dotnet

A .Net client for sensenet that makes it easy to use the REST API of the Content Repository.
https://www.sensenet.com/
GNU General Public License v2.0
7 stars 16 forks source link

Error when uploading a file (version 2.0.5) #40

Closed tusmester closed 3 years ago

tusmester commented 4 years ago

An error occures when calling the upload api in version 2.0.5 the following way:

await SenseNet.Client.Content.UploadAsync("/Root/Contents/ParentFolder", metaDataObject.FileName, stream, "File");

Error:

'Value cannot be null.\nParameter name: path2' SenseNet.Client.ClientException: Value cannot be null.\nParameter name: path2
   at SenseNet.Client.RESTCaller.ProcessWebRequestResponseAsync(String url, HttpMethod method, ServerContext server, Action`3 requestProcessor, Action`1 responseProcessor, CancellationToken cancellationToken)
   at SenseNet.Client.RESTCaller.ProcessWebResponseAsync(String url, HttpMethod method, ServerContext server, HttpContent httpContent, Action`1 responseProcessor, CancellationToken cancellationToken)
   at SenseNet.Client.RESTCaller.UploadInternalAsync(Stream binaryStream, UploadData uploadData, ODataRequest requestData, ServerContext server, Action`1 progressCallback)
   at SenseNet.Client.RESTCaller.UploadAsync(Stream binaryStream, UploadData uploadData, String parentPath, ServerContext server, Action`1 progressCallback)
   at SenseNet.Client.Content.UploadAsync(String parentPath, String fileName, Stream stream, String contentType, String propertyName, ServerContext server, Action`1 progressCallback)
   at IktatoWeb.Controllers.UploaderController.UploadChunk(IFormFile file, String dzuuid, String dzchunkindex, String dztotalchunkcount, String dztotalfilesize, String filename, String filetype) in d:\DevBS\Iktato\src\IktatoWeb\Controllers\UploaderController.cs:line 89

Downgrading to version 2.0.4 solves the issue according to @blaskodaniel.

kavics commented 4 years ago

I cannot reproduce. I will contact the customer.