.net PlatformFileStream method not found in API

  • 1
  • Question
  • Updated 10 months ago
Hi Everyone,

I'm new to sharefile and not a consumate .net c# developer but use it in SSIS  ok, so apologises if the question is particularly dumb...

This is my first foray into using the Sharefile API. i have downloaded the latest github api and sample code , build the api library , referenced it from the samples  . Tried to build the samples but I have found the following issues :
  • using ShareFile.Api.Client.FileSystem; is not finding a reference in the api
  • consequently it cant find the reference for PlatformFileStream.. I feel these two things are related (?)
The call is 
            var uploader = sfClient.GetAsyncFileUploader(uploadRequest,
                new PlatformFileStream(file, file.Length, "SampleFileUpload.txt"));

Does anyone know what I should use. Can I replace the PlatformFileStream with just a normal FileStream object? what is the missing functionality I need to implement?

Any help greatly appreciated ..

Photo of Richard D Hudson

Richard D Hudson

  • 8 Posts
  • 0 Reply Likes

Posted 10 months ago

  • 1
Photo of Luke Skrzypek

Luke Skrzypek, Software Engineer

  • 70 Posts
  • 8 Reply Likes
Hi Richard,

Sorry, the samples were a bit out-dated. They appear to have been recently updated, so you can try downloading them again. https://github.com/citrix/ShareFile-NET

As you noticed, PlatformFileStream is no longer required, and a regular FileStream works fine.