Document, File & System

Generate Pre-signed URL

Changed on

This method generates links to upload your local file to. Use this presignedUrl from the response to upload your file. Once you upload your file to this presignedUrl using PUT, you can use the url link to access the uploaded file.

get/v1/file/upload/get-presigned-url

Request

  • Base URL
    https://api.pdf.co
  • URL
    https://api.pdf.co/v1/file/upload/get-presigned-url
  • Auth
    API key in header x-api-key

Query parameters

namestring
Example:sample.pdf

File name for the generated output, the input must be in string format.

contenttypestring mime type
Example:application/octet-stream

The content type of the uploaded file

timeoutstring

Timeout for output links in seconds.

Response

Upload and access URLs generated. The file is available only after a successful PUT. Example URLs omit signing credentials; use the complete URLs from your actual response.

presignedUrlstring uri

Complete signed URL for uploading raw file bytes with PUT. Keep its query string intact.

urlstring uri

URL to use as input to conversion endpoints after the upload succeeds.

errorboolean

False when the request succeeds.

statusinteger

API status code, such as 200 for success.

namestring

Uploaded filename.

outputLinkValidTillstring date-time

Expiration timestamp for the temporary file URL.

creditsinteger

Credits used by this request.

remainingCreditsinteger

Credits remaining in the account.

durationinteger

Request duration in milliseconds.

Changes

    • breaking

      the response's property type changed from string to integer for status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status