Errors when upload video with kaltura-parallel-upload-resumablejs plugin


#1

Hi, I’m trying to move from chunked-file-upload-jquery plugin to kaltura-parallel-upload-resumablejs plugin (https://github.com/kaltura/kaltura-parallel-upload-resumablejs/tree/master) for increasing upload speed( it support parallel upload). But , almost every time, when I upload files with default setup (Simultaneous uploads: 5 Chunk size (kb): 1024) I receive this error, in response, for some chunks:
code: UPLOAD_TOKEN_CANNOT_RESUME
message: Cannot resume the upload, original file was not found
objectType: KalturaAPIException
args: []
And this error for last chunk:
{
“code”:“UPLOAD_TOKEN_CANNOT_MATCH_EXPECTED_SIZE”,
“message”:“Failed to match expected file size”,
“objectType”:“KalturaAPIException”,
“args”:[]
}
As result file did not uploaded correctly. And when I try to add mediaEntry I receive this error:
{
“code”: “UPLOAD_TOKEN_INVALID_STATUS_FOR_ADD_ENTRY”,
“message”: “Upload token is in an invalid status for adding entry, maybe the a file was not uploaded or the token was used”,
“objectType”: “KalturaAPIException”,
“args”: []
}
When I make get request for UploadToken I get status 1 for uploadtoken which means PARTIAL_UPLOAD.
Very strange behavior for plugin which should work fine from the box. Did anyone had experience with this plugin, can this issue be fixed?


#2

Hi @D11,

I see you reported it here: https://github.com/kaltura/kaltura-parallel-upload-resumablejs/issues/1
Since this is a general bug, let’s continue the discussion there.
I was able to reproduce it and shall investigate.
For now, you can continue to use https://github.com/kaltura/chunked-file-upload-jquery. resumable.js is better in that it allows for uploading several chunks in parallel but it obviously needs a bit more ironing out before it’s ready for prime time:)


#3

Hi @D11,

Please see my reply here:

Thanks,


#4

Hi @jess , I had new issues with plugin it does not work in IE 11 on Win7 x64, it return “Upload token not found” error it happens because, IE somehow get response as JSON here:
kDoJSONRequest(server, ks, “/service/uploadToken/action/add”,
“uploadToken:objectType=KalturaUploadToken” +
"&uploadToken:fileName=" + encodeURIComponent(fileName) +
"&uploadToken:fileSize=" + fileSize, function(response) {…

Also this code looks strange, here we have uploadToken[fileUniqueIdentifier] and uploadToken[file.uniqueIdentifier] is it correct?
if (! uploadToken[fileUniqueIdentifier]){
uploadToken[fileUniqueIdentifier] = response.id;
}
var query = function(file, chunk) {
var params = {
format: 1,
ks: ks,
uploadTokenId: uploadToken[file.uniqueIdentifier],

forgot to say it’s in index.html