Javascript function KalturaUploadService.upload() not found!

Hey All,

Very new to using Kaltura, I’m following the Console API/Tutorial and I stuck when attempting to call the function KalturaUploadService.upload(). The Chrome browser/debugger is telling me "xxx.upload is not a function. When I look at the source code there is only one method on that object, it’s named ‘getUploadedFileTokenByFileName’.

All suggestions are appreciated,
PS: this is where the library code came from:

Hi @garberfc,

Please follow the code samples here:;step=1
If something doesn’t work, please provide a full code sample and I’ll take a look.

Hi Jess,

Thanks for ALL you help!

In my code I already have the uploadTokenId. Here’s the code I’m attempting to execute:
var fileData = {};
var resume = true;
var finalChunk = true;
var resumeAt = 0;

	      KalturaUploadTokenService.upload(uploadTokenId, fileData, resume, finalChunk, resumeAt)
	        .execute(client, function(success, results) {
	          if (!success || (results && results.code && results.message)) {
	            console.log('Kaltura Error', success, results);
	          } else {
	            console.log('Kaltura Result', results);

The problem is that there isn’t a function named ‘upload’ on the KalturaUploadTokenService variable. I downloaded the source/library code from here: If you download the source and expand it you’ll find that the file KalturaUploadTokenService.js file doesn’t have the ‘upload’ function defined.

Hi Jess,

I replied to the thread and not your post. I’m composing this reply so that you’ll be notified…


Hi @garberfc,

You are correct. The upload function is indeed missing here:

I’ll look into it and get back to you.


Hi @jess,

Did you have any luck getting information on the missing upload() function?

Thanks in advance,

Hi @garberfc,

I’m afraid this was never implemented in the JS/AJAX client.
We put it on our TODO list but there’s no ETA at the moment.
In the meantime, if you’re most comfortable with JS, you may want to consider using the NodeJS client for this, where this functionality is implemented.
You can obtain the client from here:

And you can see a step by step code example here:;step=1
Choose NodeJS in the language selectbox.

Alternatively, this may suit your needs:

Hi @jess,

We’re pursuing the use of the library you recommended. Is the code CDN deployed anywhere?


Hi @garberfc,

No, this is meant to be hosted on your servers.
As the repo notes, this is based on, for which you can see a demo here:

Hi @garberfc,

The upload action was implemented.
To test it, please obtain:

The online Kaltura API Console at Upload_token.upload is a little vague. For instance,

  • What is expected in the fileData object?
  • Is the user of the API supposed to open the file with a browser supported file reader and repeatedly call the upload method with chunks?

Thanks for all your help,

Hi @garberfc ,

The chunked upload library does the upload flow for you; .
It will get the file from the user browse dialog, then chunk the file and upload it in chunks until the file completes upload to Kaltura. Then your app will need to call the Kaltura media.addContent API to connect the uploaded file to your desired KalturaMediaEntry object.
You can see a reference implementation here;