Here is some pseudo code :
var service = Service.Connect(myConnectionArgs);
var index = service.GetIndexes().Get("myindex");
index.Upload(pathToMyFile);
Here is some pseudo code :
var service = Service.Connect(myConnectionArgs);
var index = service.GetIndexes().Get("myindex");
index.Upload(pathToMyFile);