sco-upload

Availability

Breeze 4 and Breeze 5; Connect Enterprise Web Services 6

Description

Uploads a file to the server and then builds the file, if necessary.

If you are adding a new file, call sco-update first and pass the sco-id returned to sco-upload. If you are updating the content of a file that already exists on the server, you can call sco-upload directly.

You must call sco-upload within an HTML form element. The form element must have an encoding type of multipart/form-data. The HTML form must also have an input element with name=file, as this example shows:

<FORM action="http://domain-name/api/xml?action=sco-upload
&sco-id=xx&summary=xxx&title=xxx" enctype="multipart/form-data" method="post"> <P> What files are you sending? <INPUT type="file" name="file"> <BR> <INPUT type="submit" value="Send"> <INPUT type="reset"> </FORM>

This form uploads a single file. To upload multiple files (for example, a PPT and a PPC file), you must use additional input elements with name=file, for example:

<FORM action="http://domain-name/api/xml?action=sco-upload
&sco-id=xxx&summary=xxx&title=xxxx" enctype="multipart/form-data" method="post"> <P> PPT files you are sending <INPUT type="file" name="file"><BR> PPC files you are sending <INPUT type="file" name="file"><BR> <INPUT type="submit" value="Send"> <INPUT type="reset"> </FORM>

After the upload, call sco-info to get the status of the SCO. The status is initially in-progress, which means that the content is being built. When the status becomes active, the content build is finished, and users can access the content.

Request URL

http://server_name/api/xml
    ?action=sco-upload
    &file=formElementName
    &sco-id=integer
    &summary=string
    &title=string
    &session=BreezeSessionCookieValue

Parameters

Name

Type

Required

Description

file

Form element name

Y

The file to upload, sent from an input element with name=file in an HTML form. The HTML form must also have an encoding type of multipart/form-data defined in the form element.

sco-id

Integer

Y

The ID of the SCO you want to upload, returned by sco-update.

summary

String

N

A brief description of the SCO that Enterprise Manager or your application displays.

title

String

N

The title of the SCO.

session

String

N

The value of the BREEZESESSION cookie. Use this parameter if you do not use a client-side cookie management library.

Filters

Results cannot be filtered or sorted.

Response structure

<?xml version="1.0" encoding="utf-8" ?> 
<results>
    <status code=allowedValue />
    <files>
        <file>
            <path>string</path>
        </file>
    </files>
</results>

Response values

Element

Attribute

Type

Description

results  

Container

All results the action returns.

status  

Empty, with attributes

The status of the response.

  code

Allowed value

A code indicating the response status (see status).

files  

Container

Information about all of the uploaded files. Deprecated and may be removed in a future release.

file  

Container

Information about one file. Deprecated and may be removed in a future release.

path  

String

The path to the newly uploaded file. For Adobe internal use only. Deprecated and may be removed in a future release.

Sample request

This request is created by uploading a file through an HTML form:

http://example.com/api/xml?action=sco-upload&sco-id=2006768386

Sample response

<?xml version="1.0" encoding="utf-8" ?> 
<results>
    <status code="ok" /> 
    <files>
        <file>
            <path>624520/2006768386-10/input/WhatMakesAGreatFilm.ppt</path> 
        </file>
    </files>
</results>

See also

sco-update



Take a survey


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/breeze/6/xml_api/04c_ac19.htm