Click or drag to resize

ItemattachPhysicalFileViaStream Method

Attach physical file as a stream to the item. Calling the method means that the physical will be streamed to the server when apply() is called on the item.

Namespace:  Aras.IOM
Assembly:  IOM (in IOM.dll) Version: 14.0.20.39432
Syntax
public void attachPhysicalFileViaStream(
	string fileName,
	Stream stream
)

Parameters

fileName
Type: SystemString
Name of the file in the stream.
stream
Type: System.IOStream
Stream with the file content.
Exceptions
ExceptionCondition
Exception
  • The instance doesn't represent a single item.
  • Item is not of type 'File'.
  • Item doesn't have ID set.
  • Vault server ID is not set.
ArgumentNullException
  • Argument "fileName" is null or empty.
  • Argument "stream" is null.
Remarks
The method could only be called on client side and for items of type 'File'. It's possible to attach to the item a file with a name different than the value of item's property filename - in this case the file stored in vault will still have name and type equal to values of filename and file_type properties correspondingly.
See Also