Cloud Storage

FTP Server

To allow our servers to upload files directly to an FTP server, the following parameters to send the request are available:

Field Description Required Default
output_target.type Specifies the type of output target, in this case ftp. Yes N/A
output_target.parameters.host The URL or IP of the FTP server. Yes N/A
output_target.parameters.file Complete path to where the file will be uploaded, e.g. folder-in-ftp/image.jpeg. Yes N/A
output_target.parameters.port The port used to connect to the FTP server. No 21
output_target.credentials.username The username of the FTP server account. Yes N/A
output_target.credentials.password The password of the FTP server account. Yes N/A

Please note that in some circumstances (e.g. already existing filename on the server) the upload can be refused. For these reasons, it's highly recommended to upload converted files in new directories.

POST /v2/jobs HTTP/1.1
Host: api.api2convert.com
x-oc-api-key: <your API key here>
Content-Type: application/json
Cache-Control: no-cache

{
    "input": [{
        "type": "remote",
        "source": "https://example-files.online-convert.com/raster%20image/jpg/example_small.jpg"
    }],
    "conversion": [{
        "target": "png",
        "output_target": [{
            "type": "ftp",
            "parameters": {
                "host": "your ftp server host",
                "file": "file-will-be-saved/here.png"
            },
            "credentials": {
                "username": "your ftp server username",
                "password": "your ftp server password"
            }
        }]
    }]
}
curl -X POST \
  https://api.api2convert.com/v2/jobs \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'x-oc-api-key: <your API key here>' \
  -d '{
    "input": [{
        "type": "remote",
        "source": "https://example-files.online-convert.com/raster%20image/jpg/example_small.jpg"
    }],
    "conversion": [{
        "target": "png",
        "output_target": [{
            "type": "ftp",
            "parameters": {
                "host": "your ftp server host",
                "file": "file-will-be-saved/here.png"
            },
            "credentials": {
                "username": "your ftp server username",
                "password": "your ftp server password"
            }
        }]
    }]
}'

results matching ""

    No results matching ""