Back to product page

PutData method


Stores data from string variable to remote file.

Type

None

Syntax

  • Basic
object.PutData Data, [RemoteFile]
The PutData(object,Data,RemoteFile) syntax has these parts:
objectAn expression evaluating to an object of type wodFtpDLX.
DataRequired. A String value. String expression that represents data that will be stored to remote file.
RemoteFileOptional. A Variant value. String expression that holds full path to file on the server.

Remarks

Unlike PutFile method that copies local file to the server, PutData will copy contents of Data variable to specified file on the server. This is very handy feature for small files that are stored in local variables in your programs. Although there is no size limit on sending data to the server this way, try to keep data less than 64kb - everything depends on how much is your programming environment able to store in String variable.

What will PutData do for you? Actually, it will copy contents of specified variable to some temporary file on the disk (in temporary folder), and then just copy that file to the server. Keep in mind that for this method you *MUST* allow component to write to your disk. In case you're using wodFtpDLX in environment such as ASP, make sure guest user has privileges to create temporary files.

Once this temporary file is sent to the server, it will be deleted from local disk.

Do not forget that RemoteFile should always specify full absolute path (i.e. /home/joe/something) instead of relative path (i.e. joe/something).

Platforms

Windows