Remote input type

The following code specifies a remote input file provided via URL:

{
    "input": [{
        "type": "remote",
        "source": "https://cdn.online-convert.com/example-file/raster%20image/png/example_small.png"
    }]
}

This is the simplest way of specifying an input file. Define the type field as remote and specify the URL of the file you want to convert in the source.

Password protected files

If the input is a password protected file (e.g. pdf, zip, ...) you can specify this as following:

{ 
    "input": [{ 
        "type": "remote", 
        "source": "https://cdn.online-convert.com/example-file/document/pdf/example_multipage_protected.pdf", 
        "credentials": { 
            "decrypt_password": "online-convert.com" 
        } 
    }] 
}

It is also possible to send just the remote input like in the first example and adding the password in a second step. This is done by simply sending a PATCH request to the following endpoint:

/jobs/<job_id>/input/<input_id>

For this, use the following content:

{ 
  "credentials": { 
        "decrypt_password": "my_password" 
    } 
}

In order to patch the input, the job should not be started yet. This means it should be created using

{"process": false}

User suggested filenames

In some use cases it might be desirable to specify the name of the output file instead of using the original file name.

One such example is to rename image files with a generic name like DSC_0013.JPG to a more meaningful name like Holiday 2018_0013.png during the conversion.

A different example are dynamically generated urls like ?productId=ABC123 in which case the output filename can be set to e.g. Product ABC123 Manual.pdf.

In order to specify the new filename you have to send the file like in the folowing example:

{
    "input": [{
        "filename": "Product ABC123 Manual.pdf",
        "type": "remote",
        "source": "https://www.example.com/your_dynamic_url?productId=ABC123"
    }]
}

If you are unsure about the format of your file, just send the name without the extension. It will automatically be added by us.

results matching ""

    No results matching ""