Home Cooker Classes Others Rice CookerGX
Classes  >  loader  >  UploadFile(string,string)
loader class : UploadFile(string,string) method

Description

Uploads a local file to the resource with the specified URL.

Syntax

loaderInstance.UploadFile(string targetUrl, string fileName)

Arguments

ClassNameDescription
stringtargetUrlURL of a resource that will be uploaded.
stringfileNamePath of a file that want to upload.

Return value

None

Sample code

//anyLoader is a instance of loader type.

string targetUrl = "ftp://localhost/anyfile.txt";

string fileName = "c:\anydirectory\anyfile.txt";

anyLoader.UploadFile(targetUrl,fileName);

Notes

It's a wrapper of the System.Net.WebClient.UploadFile(String,String).

Links for reference

Copyright © Rice All rights reserved.