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

Description

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

Syntax

loaderInstance.UploadFile(uri targetUrl, string fileName)

Arguments

ClassNameDescription
uritargetUrlURL 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.

uri targetUrl = new uri("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(Uri,String).

Links for reference

Copyright © Rice All rights reserved.