folder_uploadFile

Uploads a file as an attachment to an entry.

Syntax

public void file_uploadFile( String accessToken, long entryId, String formDataItemName, String fileName );

Description

The file_uploadFile operation uploads a file as an attachment to an entry. You can attach only one file at a time; call this operation multiple times to attach more than one file to the entry.

Because transferring files across the Internet can be time-consuming, you can upload files that have already been moved to a staging area on the Teaming server by using the folder_uploadFileStaged operation.

Parameters and Return Value

accessToken

Either the security token passed to your application by Teaming as part of implementing a remote application, or the null value.

entryId

The identifier of the entry that is to include the new attached file.

formDataItemName

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 data in the Teaming database; a hidden HTML tag communicates this file mapping to the server.

The name value for the standard entry element containing attached files is ss_attachFile1. If you want to upload a file into a custom form element you defined by using the designers, you need to look up the name identifier for that form element.

If you are uploading to a folder file, specify upload as an argument to this parameter to make this attachment the primary file for the entry.

fileName

A string containing the filename of the file you want to attach to the entry.

return_value

None.

See Also