Class: Kaltura::KalturaUploadService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_client.rb

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaUploadService

Returns a new instance of KalturaUploadService.



5272
5273
5274
# File 'lib/kaltura_client.rb', line 5272

def initialize(client)
	super(client)
end

Instance Method Details

#get_uploaded_file_token_by_file_name(file_name) ⇒ KalturaUploadResponse



5277
5278
5279
5280
5281
5282
5283
5284
5285
# File 'lib/kaltura_client.rb', line 5277

def get_uploaded_file_token_by_file_name(file_name)
	kparams = {}
	client.add_param(kparams, 'fileName', file_name)
	client.queue_service_action_call('upload', 'getUploadedFileTokenByFileName', 'KalturaUploadResponse', kparams)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end

#upload(file_data) ⇒ string

Returns:

  • (string)


5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
# File 'lib/kaltura_client.rb', line 5288

def upload(file_data)
	kparams = {}
	kfiles = {}
	client.add_param(kfiles, 'fileData', file_data)
	client.queue_service_action_call('upload', 'upload', 'string', kparams, kfiles)
	if (client.is_multirequest)
		return nil
	end
	return client.do_queue()
end