Allows you to begin the process of sending data from memory directly into a file on the FTP server. After calling this method, the next step is to call the SendMemoryFileData method (one or more times) to provide the actual memory data that the library will send into the file.
This method is a blocking method, and therefore will not return until the SendMemoryFileData method has been called with the bEndOfData parameter set to True. In order for this method to work, the BackgroundProcessing property must be set to True before calling SendMemoryFile and the set back to false (if no longer needed) once the SendMemoryFileData method returns.
You can also use the SendMemoryFileEx method which accomplishes the same task as the SendMemoryFile method but does not require setting the BackgroundProcessing property.
When using this method, the library cannot inform you if the remote file already exists, but if it does exist, the bAppend parameter allows you to decide if the file should be overwritten or appended to.
When possible, set the lSize parameter to inform the library about how much memory you will be sending. This will allow the FileTransferStatus event to provide statistics on the transfer operation. Set lSize to 0 if you don't know how much data you will be sending.
This method can only be used when the CurrentState property's value is fcsConnected.
Parameter | Description |
---|---|
sRemoteFilename | The file on the FTP server to put the memory data into. Specifying a path is optional. The path can be relative to the FTP server's current working folder, or can be an absolute path on the remote system. |
bAppend | Set to True if you want to append to the file if it already exists. Set to False if you want to overwrite the file if it already exists. |
lSize | The total size, if known, of the memory data you will be providing to the library to write into the remote file. If the size is unknown, set this to 0. |
Declaration | |
---|---|
|
AccountName, AllocateStorage, LocalDataAddress, LocalDataPort, PassiveMode, RemoteDataAddress, RemoteDataPort, BackgroundProcessing
FileTransferStatus, LoggingCommandLine, ProcessCompleted, SendingFile