Back to product page
- Introduction
- License agreement
- Classes
- Enumerations
- Exceptions
- WeOnlyDo.Client.FtpDLX
- Properties
- Authentication
- Blocking
- BufferSize
- Certificate
- Compression
- DirFormat
- DirItems
- Encryption
- Hostname
- KeepAlive
- LastError
- ListItem
- ListParams
- LocalPath
- Login
- MaxTransferRate
- Passive
- Password
- Port
- PreserveDates
- PrivateKey
- Protocol
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- PublicKeyOpenSSH
- PublicKeySSH
- RemotePath
- Resume
- SecureMethod
- SmartGet
- SmartPut
- State
- StrictHost
- Tag
- Timeout
- Timezone
- TransferMode
- TransferRate
- TransferTime
- UseIPv6
- Version
- Methods
- Events
- Properties
- WeOnlyDo.Client.DirItemsCollection
- WeOnlyDo.Client.DirItem
- How to get support?
SmartPut property
Determines if wodFtpDLX.NET should try to determine remote filename on PutFile command.
Type
BooleanSyntax
- C#
- VB.NET
Boolean SmartPut {get; set; };
Property SmartPut As Boolean
Remarks
wodFtpDLX.NET tries to be smart when you call PutFile method. It tries to determine which filename are you trying to upload, by querying remote server if supplied RemotePath in PutFile call is a directory, in which case name is specified as last part of LocalPath argument of PutFile call. This is a nice thing - it allows you specify whatever you wish in LocalPath and RemotePath arguments, but usually causes wodFtpDLX.NET to send one additional CWD before uploading file on the server. Some administrators and users prefer not to see that command in logs.In such cases you can set SmartPut to False, in which case wodFtpDLX.NET will assume you have specified full paths in both LocalPath and RemotePath arguments in PutFile call. If you specify only folder(s), PutFile will fail.
As example, you can look at this PutFile call:
PutFile("c:\somefolder\a", "/somewhere/b")
If 'a' is a file - what is your intention? Do you want to store this file to remote server as file named 'b' or you want to store it as file 'a' in remote folder 'b'? wodFtpDLX cannot know this so he tests for existance of "/somewhere/b". If such folder is found, file is saved as "/somewhere/b/a". If such folder is not found, file is saved as "/somewhere/b" . When SmartPut is set to False, error will be generated if "/somewhere/b" is a folder.