Put

Uploads the given data to the specified URL.

Note: Acrobat and Adobe Reader cannot verify that the form is certified until after the initialize event initiates. To use the Put function on certified forms prior to the form rendering, use the docReady event.

Syntax

Put(s1, s2 [, s3 ])

Parameters

Parameter

Description

s1

The URL to upload.

s2

The data to upload.

If the function is unable to upload the data, it returns an error.

s3 (Optional)

A string containing the name of the code page used to encode the data. Here are valid code page names:

  • UTF-8 (default value)

  • UTF-16

  • ISO8859-1

  • Any character encoding listed by the Internet Assigned Numbers Authority (IANA)

If you do not include a value for s3, the function sets the code page to the default value. The application ensures that encoding of the data to upload matches the specified code page.

Examples

The following expression is an example that use the Put function:

Expression

Returns

Put("ftp://www.example.com/pub/fubu.xml", 
"<?xml version='1.0' 
encoding='UTF-8'?><msg>hello world!</msg>")

Nothing if the FTP server has permitted the user to upload some XML data to the pub/fubu.xml file. Otherwise, this function returns an error.

Note: This example only works in the server environment and not in Acrobat or Adobe Reader. For forms displayed in Acrobat and Adobe Reader, use the HTTP, HTTPS, and FILE protocols.

// Ethnio survey code removed