Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFFile.Upload Method (String)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFFile.Upload Method (String)
Uploads the file specified by the path to the server.

Namespace:  OSIsoft.AF.Asset
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public void Upload(
	string path
)
Public Sub Upload ( 
	path As String
)

Dim instance As AFFile
Dim path As String

instance.Upload(path)
public:
void Upload(
	String^ path
)
member Upload : 
        path : string -> unit 

Parameters

path
Type: SystemString
A relative or absolute path for the file to be uploaded.

Remarks

If the Owner has been set and is associated with a PISystem, then the file is uploaded to the server. Otherwise, the Stream will be buffered until the Owner is set to an object associated with a PISystem.

When the file is uploaded, the following properties are automatically updated: Name, Author, ChangeDate, and FileSize. The file is also validated that its size does not exceed the FileMaxLength and that its extension is in the FileAllowedExtensions list of allowed file extensions. These validation settings can be modified using the AFDiag utility.

Version Information

AFSDK


See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in