Activities
latest
false
Productivity Activities
Last updated Jun 3, 2024

UploadFile

Uploads the specified file to OneDrive or SharePoint.

Namespace: UiPath.MicrosoftOffice365.Activities.Api

Assembly: UiPath.MicrosoftOffice365.Activities.Api (in UiPath.MicrosoftOffice365.Activities.Api.dll)

Overloads

OverloadDescription
UploadFile(IResource, IFolder, ConflictBehavior, DataTable)Uploads the specified file to OneDrive or SharePoint.
UploadFile(String, IFolder, ConflictBehavior, DataTable)Uploads the file from the specified local path to OneDrive or SharePoint.
UploadFile(Stream, String, IFolder, ConflictBehavior, DataTable)Uploads a file to OneDrive or SharePoint.

UploadFile(IResource, IFolder, ConflictBehavior, DataTable)

Uploads the specified file to OneDrive or SharePoint.
IFile UploadFile(
	IResource file,
	IFolder destination = null,
	ConflictBehavior conflictBehavior = ConflictBehavior.Replace,
	DataTable metadata = null
)IFile UploadFile(
	IResource file,
	IFolder destination = null,
	ConflictBehavior conflictBehavior = ConflictBehavior.Replace,
	DataTable metadata = null
)
file IResource
The file to upload.
destination IFolder (Optional)
The destination folder where to upload the file. If not specified, it defaults to OneDrive root folder.
conflictBehavior ConflictBehavior (Optional)
Indicates the conflict resolution behavior in case files with the same name already exist.
metadata DataTable (Optional)
The metadata to associate with the uploaded file. It works only for files stored in a SharePoint document library. It should contain two columns, the first one representing the display name of the field (String) and the second its value (Object).

UploadFile(String, IFolder, ConflictBehavior, DataTable)

Uploads the file from the specified local path to OneDrive or SharePoint.
IFile UploadFile(
	string path,
	IFolder destination = null,
	ConflictBehavior conflictBehavior = ConflictBehavior.Replace,
	DataTable metadata = null
)IFile UploadFile(
	string path,
	IFolder destination = null,
	ConflictBehavior conflictBehavior = ConflictBehavior.Replace,
	DataTable metadata = null
)
path String
The local path of the file to upload.
destination IFolder (Optional)
The destination folder where to upload the file. If not specified, it defaults to OneDrive root folder.
conflictBehavior ConflictBehavior (Optional)
Indicates the conflict resolution behavior in case files with the same name already exist.
metadata DataTable (Optional)
The metadata to associate with the uploaded file. It works only for files stored in a SharePoint document library. It should contain two columns, the first one representing the display name of the field (String) and the second its value (Object).

UploadFile(Stream, String, IFolder, ConflictBehavior, DataTable)

Uploads a file to OneDrive or SharePoint.
IFile UploadFile(
	Stream stream,
	string fileName,
	IFolder destination = null,
	ConflictBehavior conflictBehavior = ConflictBehavior.Replace,
	DataTable metadata = null
)IFile UploadFile(
	Stream stream,
	string fileName,
	IFolder destination = null,
	ConflictBehavior conflictBehavior = ConflictBehavior.Replace,
	DataTable metadata = null
)
stream Stream
The stream for the file to upload to Google Drive.
fileName String
The name of the file including the extension.
destination IFolder (Optional)
The destination folder where to upload the file. If not specified, it defaults to OneDrive root folder.
conflictBehavior ConflictBehavior (Optional)
Indicates the conflict resolution behavior in case files with the same name already exist.
metadata DataTable (Optional)
The metadata to associate with the uploaded file. It works only for files stored in a SharePoint document library. It should contain two columns, the first one representing the display name of the field (String) and the second its value (Object).

Return value

IFile - The uploaded file.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.