Back to product page
- Introduction
- Overview
- License agreement
- Getting Started
- Objects
- Enumerations
- wodSFTP
- Methods
- Abort
- About
- AppendData
- AppendFile
- Connect
- DeleteFile
- DeleteFiles
- Disconnect
- ExtendedCmd
- GetAttributes
- GetData
- GetDataAt
- GetFile
- GetFileAt
- GetFiles
- ListAttributes
- ListDir
- ListNames
- LoopFiles
- MakeDir
- PutData
- PutDataAt
- PutFile
- PutFileAt
- PutFiles
- RealPath
- RemoteClose
- RemoteOpen
- RemoteRead
- RemoteWrite
- RemoveDir
- Rename
- SetAttributes
- SetAttributes64
- Properties
- Authentication
- Blocking
- BufferSize
- ClientName
- Compression
- Encryption
- EncryptionList
- ErrorText
- Extensions
- FingerPrint
- FIPS
- HMacList
- Hostname
- KeepAlives
- KeyExchangeList
- KeySignatureList
- LastError
- ListItem
- LocalPath
- Login
- MaxTransferRate
- MyHostname
- MyIP
- Notification
- Password
- Port
- PrivateKey
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- RemoteIdentification
- RemotePath
- Resume
- ServerErrorCode
- ServerErrorText
- State
- StateText
- Timeout
- Timezone
- TransferMode
- TransferRate
- TransferTime
- UseIPv6
- Version
- Events
- Methods
- IwodSFTPNotify
- SftpItem
- SftpItems
- How to get support?
- Technical information
- Fast notifications interface
- Error list
PutData method
Stores data from a string variable to a remote file.
Type
NoneSyntax
- Basic
object.PutData Data, [RemoteFile]
The PutData(object,Data,RemoteFile) syntax has these parts:
The PutData(object,Data,RemoteFile) syntax has these parts:
object | An expression evaluating to an object of type wodSFTP. |
Data | Required. A String value. Represents data that will be stored on the server. |
RemoteFile | Optional. A Variant value. Full path to a file on the server. |
Remarks
Unlike the PutFile method that copies a local file to the server, PutData will copy the contents of the Data variable to the specified file on the server. This is a very useful feature for small files that are stored in local variables within your programs. Although there is no size limit on sending data to the server in this way, you should try to keep the amount below 64kb. This depends on how much data your programming environment is able to store in a String variable.What will PutData do for you? It will copy the contents of specified variable to a temporary file on the disk (in the temporary folder) and then copy that file to the server. Keep in mind that for this method you *MUST* allow the component to write to your disk. If you are using wodSFTP in an environment such as ASP, please ensure that the Guest user has sufficient privileges to create temporary files.
Once the file has been created and sent to the server it will be deleted from the local disk.
In ASP we advise that you make the call as follows:
Sftp1.PutData CStr(Data), CStr(RemoteFile)
This will ensure that wodSFTP can read the optional string parameter correctly.