Click or drag to resize

AttachmentVersioningResourcesAttachNewVersion Method

Uploads a new version of a file to a Sheet or Row. This operation can be performed using a simple upload or a multipart upload. For more information, see Posting an Attachment.

It mirrors to the following Smartsheet REST API method:
POST /sheets/{sheetId}/attachments/{attachmentId}/versions

Remarks

Uploading new versions is not supported for attachments on Comments or for URL attachments.

This is a resource-intensive operation and incurs 10 additional requests against the rate limit.

Namespace:  Smartsheet.Api
Assemblies:   smartsheet-csharp-sdk (in smartsheet-csharp-sdk.dll) Version: 2.126.0
  smartsheet-csharp-sdk (in smartsheet-csharp-sdk.dll) Version: 2.126.0
Syntax
Attachment AttachNewVersion(
	long sheetId,
	long attachmentId,
	string file,
	string fileType
)

Parameters

sheetId
Type: SystemInt64
the sheet id
attachmentId
Type: SystemInt64
the attachment id
file
Type: SystemString
the file path
fileType
Type: SystemString
the file type, can be null

Return Value

Type: Attachment
Attachment object for the newly created attachment
Exceptions
ExceptionCondition
InvalidOperationException if any argument is null or empty string
InvalidRequestException if there is any problem with the REST API request
AuthorizationException if there is any problem with the REST API authorization (access token)
ResourceNotFoundException if the resource cannot be found
ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting)
SmartsheetException if there is any other error during the operation
See Also