Returning files from server - marcos8154/SocketAppServer GitHub Wiki

Returning files from the server is too simple. Create an action on your controller by simply returning ActionResult.File (filePath), as in the example below.

return ActionResult.File("filePathHere");

At the client layer, using the MobileAppServer.Client library (available from Nuget), simply call the GetResultFile() method, available from the Client class.

byte[] fileBytes = client.GetResultFile();