migration_uploadFolderFileStaged

Uploads a local copy of an entry attachment, allowing preservation of SiteScape Forum data.

Syntax

public void migration_uploadFolderFileStaged( String accessToken, long binderId, long entryId, String formDataItemName, String fileName, String stagedFileRelativePath, String modifier, Calendar modificationDate );

Description

The migration_uploadFolderFileStaged operation accesses a file that has been copied locally to the Teaming server as a way to streamline the transfer of files, avoiding transferring them over the Internet. The operation then attaches the file to a folder entry in Teaming.

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.

binderId

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

entryId

The identifier of the entry to which you want to attach a 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 name of the file you want to attach to an entry.

stagedFileRelativePath

A pathname of the file relative to the staging area on the server side. On the Teaming server, the staging directory is designated by the value of the staging.upload.files.rootpath configuration setting. This relative pathname is resolved against the staging directory of the Teaming server to identify the input file.

Although the files can be present in any folder structure within the staging area, one streamlined way to approach this task is to unzip the Forum hidden directory into the staging area. Then, use this parameter to specify the relative path through the hidden folder structure to the location of the file to be attached to the entry in Teaming.

modifier

A string containing the username of the person who last modified the file in the Forum installation.

modificationDate

A Calendar Java object that contains the date that the file was last modified in the Forum installation.

return_value

None.

See Also