profile_uploadFile

Uploads a file as an attachment to a user or group.

Syntax

public void profile_uploadFile( String accessToken, long principalID, String formDataItemName, String fileName );

Description

The profile_uploadFile operation performs an action similar to using the user interface to upload a picture to user profiles. Files are attached one at a time; call this operation multiple times to attach more than one file to the binder.

By default, only user profiles contain files. However, it is possible for site administrators to customize groups by using the designer tools in the user interface,

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.

principalId

The identifier for the user or group to which you want to attach a file.

formDataItemName

A string containing the internal identifier for the part of the principal 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. To upload a file into the custom forms element you defined by using the designer, you need to look up the name identifier for that form element.

To upload a picture for a user profile, specify picture as an argument to this parameter to make this attachment one of the pictures associated with the user profile.

fileName

A string containing the filename of the file you want to upload to the principal.

return_value

None.

See Also