Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

FileInfo Files myFiles.Download(name: string, mimeType: string, options: FileTransferOptions)

Arguments

string name
Name of file to be saved.
string mimeType
Mime type of file
Download options. See ,FileTransferOptions, for more details.

Example

Downloading file from url

Code Block
languagejs
//Creating File Transfer Option
var fileTransferOptions = {
    RemoteHost : 'www.emakin.com',   //Url
    RemotePath : 'images/image.jpg', //Location
    Port : 80,                       //Port
    Protocol : 'HTTP'                //Protocol
};


//Downloading File
var file = $Files.Download("FileName", 'image/jpeg', fileTransferOptions);

Examples

...

languagejs

...

Types

FileTransferOptions

...

{ // Password to authenticate on remote environment. Optional. Password : string // Port number of remote environment. Optional. Port : number // Protocol to use for file transfer. Optional. Default is FTP. Protocol : ( "FTP" | "FTPS" | "SFTP" | "HTTP" | "HTTPS" ) // IP address or host name of remote environment. RemoteHost : string // Path of file on remote environment. RemotePath : string // Username to authenticate on remote environment. Optional. UserName : string }

See Also