Cloud Storage

Google Cloud Storage

To allow our servers to save files on a Google Cloud Storage, follow these instructions:

Below you can find a list with the fields accepted in this output target:

FieldDescriptionRequiredDefault
output_target.typeSpecifies the type of output target, in this case googlecloud.YesN/A
output_target.parameters.projectidThe ID of your Google Cloud project.YesN/A
output_target.parameters.bucketDetermines to which bucket our servers upload the file.YesN/A
output_target.parameters.fileComplete path to where the file will be uploaded, e.g. folder-inside-bucket/image.jpeg.YesN/A
output_target.credentials.keyfileHere, specify the contents of your json private key file. You can generate one following these instructions.YesN/A

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

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

{
    "input": [{
        "type": "remote",
        "source": "https://static.online-convert.com/example-file/raster%20image/jpg/example_small.jpg"
    }],
    "conversion": [{
        "category": "image",
        "target": "png",
        "output_target": [{
            "type": "googlecloud",
            "parameters": {
                "projectid": "your project id",
                "bucket": "your bucket name",
                "file": "the complete path to where you want to store the file"
            },
            "credentials": {
                "keyfile": {
                    "type": "...",
                    "project_id": "...",
                    "private_key_id": "...",
                    "private_key": "...",
                    ... and more fields below ...
                }
            }
        }]
    }]
}
curl -X POST \
  https://api2.online-convert.com/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://static.online-convert.com/example-file/raster%20image/jpg/example_small.jpg"
    }],
    "conversion": [{
        "category": "image",
        "target": "png",
        "output_target": [{
            "type": "googlecloud",
            "parameters": {
                "projectid": "your project id",
                "bucket": "your bucket name",
                "file": "the complete path to where you want to store the file"
            },
            "credentials": {
                "keyfile": {
                    "type": "...",
                    "project_id": "...",
                    "private_key_id": "...",
                    "private_key": "...",
                    ... and more fields below ...
                }
            }
        }]
    }]
}'

results matching ""

    No results matching ""