folder_uploadFileStaged

Locates a locally stored file and attaches it to an entry.

Syntax

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

Description

As a way to streamline the transfer of files, the file_uploadFileStaged operation accesses a file that has been copied locally to the Vibe server, avoiding transferring them over the Internet. The operation then attaches the file to a folder entry in Vibe. In order for the Web services client to utilize this operation, the Vibe administrator must first configure the server to allow this operation by specifying staging.upload.files.enable and staging.upload.files.rootpath configuration settings in ssf-ext.properties file. Because it involves Vibe administrator access to the server environment, this operation is reserved only for major migration projects where individual file uploads through the HTTP protocol do not meet the performance requirements of the project.

Parameters and Return Value

accessToken

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

entryId

An identifier for 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 Vibe 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_attachFile. 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.

stagedFileRelativePath

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

return_value

None.

See Also