uploadFolderFile

Attaches a file to an entry to a folder. (V1—V1.0.3)

Syntax

public void uploadFolderFile( long folderId, String entryId, String fileUploadDataItemName, String attachedfileName );

Description

The uploadFolderFile operation attaches a file to an entry in a folder. You can attach only one file at a time; call this operation multiple times to attach more than one file to the entry. Files to be attached must be located in the same directory as the executing client.

Parameters and Return Value

folderId

The binder identifier of the folder that contains the entry to which you want to attach a file.

entryId

The identifier of the entry to which you want to attach a file.

fileUploadDataItemName

A string containing the internal identifier for the part of the entry that contains attached files. This identifier maps the name attribute of an input HTML tag on a form to the Teaming database; a hidden HTML tag communicates this mapping to the server.

The name value for the standard entry element containing attached files is ss_attachFile. If you want to upload a file into a custom form element you defined using the designers, you need to look up the name identifier for that form element (see also getDefinitionConfigAsXML or getFolderEntryAsXML).

attachedFileName

The name of the file you wish to attach to the new entry. This client is responsible for locating on its local system the file to be used as an attachment.

return_value

None.

Example

call.setOperationName(new QName("uploadFolderFile")); Object result = call.invoke(new Object[] {new Long(21), new Long(43), new String(“ss_attachFile”), filename}, filename);

This code attaches a file to entry 43 in the folder whose binder ID is 21. The name of the file to be attached to the entry is contained in the variable filename.

See Also