Attach physical file 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: 11.0.0.6296

Syntax

C#
public void attachPhysicalFile(
	string filePath
)
Visual Basic (Declaration)
Public Sub attachPhysicalFile ( _
	filePath As String _
)
J#
public void attachPhysicalFile(
	String filePath
)
JScript
public function attachPhysicalFile(
	filePath : String
)

Parameters

filePath
Type: System..::.String
Path to the physical file.

Remarks

The method could only be called on client side and for items of type 'File'. User can pass to the method either absolute or relative path to a physical file. Relative path information is interpreted as relative to the current working directory (i.e. location of the client executable). It's possible to attach to the item a physical 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. Note, that if physical file was moved or deleted between calls to this method and Item.apply(), the later operation would fail.

Exceptions

ExceptionCondition
System..::.Exception
  • The instance doesn't represent a single item.
  • Item is not of type 'File'.
  • Item doesn't have ID set.
  • Failed to obtain user's default vault ID.
System..::.ArgumentExceptionSpecified file was not found.

See Also