Back to product page
- Introduction
- License agreement
- Getting Started
- Enumerations
- Objects
- wodXMPP
- Methods
- Properties
- Authentication
- AutoVisible
- BackColor
- Blocking
- BorderVisible
- Capabilities
- ChatRooms
- CombineResources
- Contacts
- Enabled
- Features
- Files
- FillColor
- Font
- ForeColor
- Identity
- Language
- LastError
- LastErrorText
- Login
- Notification
- Password
- Picture
- Port
- Priority
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- Register
- Resource
- RowHeight
- SecureMethod
- Security
- Services
- ServicesFiltered
- ShowMyself
- SmallFont
- State
- StateText
- Status
- StatusText
- TabStop
- Timeout
- UseUPnP
- VCard
- Version
- Events
- ChatRoomData
- ChatRoomInvite
- ChatRoomListDone
- Click
- Connected
- ContactAuthRequest
- ContactList
- ContactSearchDone
- ContactStatusChange
- DblClick
- Disconnected
- Error
- FileTransferEnd
- FileTransferProgress
- FileTransferStart
- HostCertificate
- IncomingMessage
- IncomingNotification
- Pong
- PreTranslateCommand
- PreTranslateReply
- PrivateData
- ServiceRegister
- ServiceStatusChange
- StateChange
- UnhandledIQ
- VCardDetails
- IwodXMPPNotify
- Methods
- ChatRoomData
- ChatRoomInvite
- ChatRoomListDone
- Connected
- ContactAuthRequest
- ContactList
- ContactSearchDone
- ContactStatusChange
- Disconnected
- Error
- FileTransferEnd
- FileTransferProgress
- FileTransferStart
- HostCertificate
- IncomingMessage
- IncomingNotification
- Pong
- PreTranslateCommand
- PreTranslateReply
- PrivateData
- ServiceRegister
- ServiceStatusChange
- StateChange
- UnhandledIQ
- VCardDetails
- Methods
- XMPPChatRoom
- XMPPChatRooms
- XMPPContact
- XMPPContacts
- XMPPFeature
- XMPPFeatures
- XMPPFile
- XMPPFiles
- XMPPIdentities
- XMPPIdentity
- XMPPMessage
- XMPPService
- XMPPServices
- XMPPTag
- XMPPTags
- XMPPVar
- XMPPVars
- XMPPVCard
- Methods
- Properties
- BirthDay
- Description
- FirstName
- FullName
- HomeAddress
- HomeAddressExt
- HomeCellPhone
- HomeCity
- HomeCountry
- HomeFax
- HomePhone
- HomeState
- HomeZip
- JID
- LastName
- MiddleName
- NickName
- OrganizationName
- OrganizationUnit
- Photo
- PhotoData
- PhotoURL
- Role
- Title
- URL
- WorkAddress
- WorkAddressExt
- WorkCellPhone
- WorkCity
- WorkCountry
- WorkFax
- WorkPhone
- WorkState
- WorkZip
- wodXMPP
- How to get support?
- Technical information
- Fast notifications interface
- Error list
SendFile method
Sends file to contact.
Syntax
- Basic
object.SendFile (Contact, Filename, Description)
The SendFile(object,Contact,Filename,Description) syntax has these parts:
The SendFile(object,Contact,Filename,Description) syntax has these parts:
object | An expression evaluating to an object of type wodXMPP |
Contact | A Variant value. Reference to the contact, or his JID. |
Filename | A String value. Full path to the file that will be sent. |
Description | Can be empty. Holds user-friendly description of the file, to be shown to remote side. |
Remarks
SendFile method initiates file transfer to remote contact. wodXMPP will negotiate transfer parameters and will determine which protocol to use for file transfer. When transfer is about to start, FileTransferStart event will fire where you can change, for example, DataIP if you want to force connection to different IP than provided by wodXMPP itself.After SendFile is called, it is possible that wodXMPP first sends request to remote contact to provide features it supports so wodXMPP can determine which protocol to use. That may slow down start of the first file transfer in that session, but only for short period of time (up to few seconds).
When transfer finishes, FileTransferEnd will fire, providing with possible ErrorCode and ErrorText description, if error occurred.
You can also use FileTransferProgress method to monitor progress of the file transfer.
Return value of SendFile method is newly created XMPPFile object, where you can set up other properties, or access them if needed. Even after calling SendFile you can adjust returned File's properties since upload request is not already sent - it will take few milliseconds before it is sent, so there is time to tweak your code (such as, to change MimeType property).