activities
latest
false
UiPath logo, featuring letters U and I in white
Productivity Activities
Last updated Nov 21, 2024

UploadFile

Uploads a file to Google Drive.

Namespace: UiPath.Gsuite.Activities.API

Assembly: UiPath.Gsuite.Activities.API (in UiPath.Gsuite.Activities.API.dll)

Overloads

OverloadDescription
UploadFile(IResource, IFolder, Boolean, ConflictBehavior, Boolean)Uploads a file to Google Drive
UploadFile(String, IFolder, Boolean, ConflictBehavior, Boolean)Uploads a local file to Google Drive
UploadFile(Stream, String, IFolder, Boolean, ConflictBehavior, Boolean) Uploads a file to Google Drive

UploadFile(IResource, IFolder, Boolean, ConflictBehavior, Boolean)

Uploads a file to Google Drive.
public IFile UploadFile(
	IResource file,
	IFolder destination,
	bool convertToGoogleTypes = false,
	ConflictBehavior conflictBehavior = ConflictBehavior.AddSeparate,
	bool uploadAsIsIfConvertFails = false
)public IFile UploadFile(
	IResource file,
	IFolder destination,
	bool convertToGoogleTypes = false,
	ConflictBehavior conflictBehavior = ConflictBehavior.AddSeparate,
	bool uploadAsIsIfConvertFails = false
)
file IResource
The file to upload to Google Drive.
destination IFolder
The destination folder where to upload the file. If not specified, it defaults to Google Drive root folder.

convertToGoogleTypes Boolean (Optional)
Indicates whether to convert the uploaded file into a Google Workspace file type, such as a Google Doc or Sheet.
conflictBehavior ConflictBehavior (Optional)
What is the expected behavior when a file with the same name already exists in the destination folder.
uploadAsIsIfConvertFails Boolean (Optional)
Indicates if the file will be uploaded when the conversion to a Google Workspace file type fails.

UploadFile(String, IFolder, Boolean, ConflictBehavior, Boolean)

Uploads a local file to Google Drive.
public IFile UploadFile(
	string path,
	IFolder destination,
	bool convertToGoogleTypes = false,
	ConflictBehavior conflictBehavior = ConflictBehavior.AddSeparate,
	bool uploadAsIsIfConvertFails = false
)public IFile UploadFile(
	string path,
	IFolder destination,
	bool convertToGoogleTypes = false,
	ConflictBehavior conflictBehavior = ConflictBehavior.AddSeparate,
	bool uploadAsIsIfConvertFails = false
)
path String
The local path of the file to upload to Google Drive.
destination IFolder
The destination folder where to upload the file. If not specified, it defaults to Google Drive root folder

.

convertToGoogleTypes Boolean (Optional)
Indicates whether to convert the uploaded file into a Google Workspace file type, such as a Google Doc or Sheet.
conflictBehavior ConflictBehavior (Optional)
What is the expected behavior when a file with the same name already exists in the destination folder.
uploadAsIsIfConvertFails Boolean (Optional)
Indicates if the file will be uploaded when the conversion to a Google Workspace file type fails.

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

Uploads a file to Google Drive
public IFile UploadFile(
	Stream stream,
	string fileName,
	IFolder destination,
	bool convertToGoogleTypes = false,
	ConflictBehavior conflictBehavior = ConflictBehavior.AddSeparate,
	bool uploadAsIsIfConvertFails = false
)public IFile UploadFile(
	Stream stream,
	string fileName,
	IFolder destination,
	bool convertToGoogleTypes = false,
	ConflictBehavior conflictBehavior = ConflictBehavior.AddSeparate,
	bool uploadAsIsIfConvertFails = false
)
stream Stream
The stream for the file to upload to Google Drive.
file String
The name of the file including the extension.
destination IFolder
The destination folder where to upload the file. If not specified, it defaults to Google Drive root folder.
convertToGoogleTypes Boolean (Optional)
Indicates whether to convert the uploaded file into a Google Workspace file type, such as a Google Doc or Sheet.
conflictBehavior ConflictBehavior (Optional)
What is the expected behavior when a file with the same name already exists in the destination folder.
uploadAsIsIfConvertFails Boolean (Optional)
Indicates if the file will be uploaded when the conversion to a Google Workspace file type fails.

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.