Upload csv files programmatic c#

hey guys, I am interested in uploading csv files programmatically using the Kaltura API (not the KMC interface).
However I was not able to find any code samples for it (I use c#)
I could not find out how to use KalturaBulkUploadCsvJobData class (if its really the one I should use).
Best regards, Dor Hivert.

Hi @dor_hivert,

Service is called BulkuploadService, the action you’ll want is Add().
I don’t code in C# too often but should be something along the lines of:

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace Kaltura{
class CodeExample{
static void Main(string[] args){
KalturaConfiguration config = new KalturaConfiguration(partnerId);
config.ServiceUrl = “”;
KalturaClient client = new KalturaClient(config);
int conversionProfileId = null;
File csvFileData = “/path/to/csv”;
KalturaBulkUploadType bulkUploadType = KalturaBulkUploadType.CSV;
String uploadedBy = null;
String fileName = null;
Object result = client.BulkuploadService.Add(conversionProfileId, csvFileData, bulkUploadType, uploadedBy, fileName);
}
}
}

Here is a PHP script I wrote that accomplishes the same, as a reference point:

1 Like