Click or drag to resize
VaultUtilsUploadFile Method
Uploads file content to vault using specified vault protocol.

Namespace: PDTec.IceNet.Sdk.Utils
Assembly: PDTec.IceNet.Sdk (in PDTec.IceNet.Sdk.dll) Version: 6.0.0.0 (6.0.6225.27214)
Syntax
C#
public static void UploadFile(
	IVaultProtocol protocol,
	string uuid,
	string path,
	int chunkSize = 10485760
)

Parameters

protocol
Type: PDTec.IceNet.Core.DatabaseIVaultProtocol
Vault protocol used to upload contents. Must not be null.
uuid
Type: SystemString
Uuid of a content to be uploaded. Must not be null.
path
Type: SystemString
Path to a file on a filesystem, which should be uploaded. Must not be null.
chunkSize (Optional)
Type: SystemInt32
Maximum size of a chunk which is read from a disk file and appended, in bytes. Default is 10MB. Cannot be less than 1.
Remarks
Function reads file from disk in chunks of a size specified by chunkSize and appends them to vault content one by one. When exception is thrown, content can be uploaded only partially. This function does no transaction management; when uploading to a database vault, transaction must be started and commited by a caller.
See Also