Search in documentation:     Advanced search
Browse by category:

uploadVideo

Views: 2200
Votes: 1
Posted: 30 Apr, 2008
Updated: 24 Sep, 2009
Description

Upload File and associated data

Request Method

POST only

Input Data

file (file)
xml_data (XML string)
token (string)

X-Progress-ID (string) optional

appToken (string)

callback_url (string) optional

Output Data

XML


Data Input:

·        file: absolute path of the file to upload

            file=   E:/partage/Take_a_seat.flv 
 

·        xml_data: data associated to the file (XML String)

            
<kewego_call>
            <params>

                        <title>Test de titre</title>

                        <description>Ceci est la description de la video</description>

                        <categories>
                                   <category>Mode</category>
                                   <category>Humour</category>
                                   <category>Musique</category>
                        </categories>
                        <keywords>
                                   <keyword>test1</keyword>
                                   <keyword>test2</keyword>
                                   <keyword>test3</keyword>
                                   <keyword>test4</keyword>
                                   <keyword>test5</keyword>
                        </keywords>
                        <language>fr</language>
                        <country>fr</country>
                        <postal_code>75017</postal_code>
                        <access>restricted</access>

                        <video_pid>123456</video_pid>

                        <commentable>yes</commentable>

                        <shareable>no</shareable>

                        <notable>no</notable>

                        <production_date>2008-01-01 12:00:00</production_date>

            </params>
</kewego_call>
 

            XML Data Details
title

Title of the video

Required
description

Description of the video

Required
categories

List of categories available on the destination site (1 to 3 categories)

Required
keywords

List of keywords (2 minimum)

Required
language

Language code (ISO normalization) (2 characters)

Required
country

Country code (ISO normalization) (2 characters)

Optional
postal_code
Postal code
Optional
access

Visibility of the video. 2 values possible : public / restricted
Default value : public

Optional
video_pid
PID of the video
Optional
Commentable

Video is commentable. 2 values possible: yes / no

Default value : yes
Optional
Shareable

Video is shareable. 2 values possible: yes / no

Default value : yes
Optional
notable

Video is notable. 2 values possible: yes / no

Default value : yes
Optional
Production_date

Video production date

Optional
 

·        token: User token (string)

            
token=17d56835df8284736678f8213bc4b70c08af0beeb946b8f624774975c1058d0b

·        X-Progress-ID: unique key using to follow a upload (md5) (optional)

Attention: X-Progress-ID must be sent as GET, not as POST. You may add the parameter in the URL to force the GET.

            

X-Progress-ID = e0efceebe9f32e39ff3e56f3eb75e5ff

 

·        appToken : Application Token (string)

            appToken=   d24267bee58313337341f46771f3eeaa64b9254856b0ff3dc6eab18718db0a5e 
 

·        callback_url : destination url at the end of the upload. (string) optional

            callback_url=http://www.yourdomain.com/ 
if you used this option the callback_url be :

success : http://www.yourdomain.com/?sig=iLyROoafYdki

failed : http://www.yourdomain.com/?errno=1001

Calling:

http://upload.kewego.com/api/uploadVideo/index.php

Warning : you must indicate index.php at the end of the calling to assure a correct response of the API method.

Data output:

·        XML message

            
<kewego_response>
            <message>
                        <sig>iLyROoafZWxg</sig>
            </message>
</kewego_response>
 

Output Details:

Sig
Video identifier
 

Error Messages:

            

<kewego_response error="yes">

            <kewego_error errno="1006">Data missing </kewego_error>

</kewego_response>
 
1029
appToken error
1002
Valid token missing
1035
No XML data found
1036

No token provided

1027
Uploading faile
1034
Source file sha1 failed
1006
Data missing or bad data : check parameters and xml_data
1013
Site URL Incorrect
1009
Session failed
1010
No file found
1038 XML parsing error
1005 Check file failed
1042 Title can't be empty
1043 Description can't be empty
1046 This user is not a user of the product
Attached files
file upload_xml_data.xsd (3 kb)

Also read
document Uploading forms

Others in this Category
document getAvailableCategories
document getUploadProgress
document uploadKAD
document uploadImage
document prepareUpload
document uploadPreparedVideo
document uploadFile
document finishUpload
document uploadThumbnails
document addUploadedVideo



RSS