PDF.co API icon

PDF.co API

Generate PDF, extract data from PDF, split PDF, merge PDF, convert PDF. Fill PDF forms, add text and images to pdf and much more with pdf.co!

Upload File

AI-generated

Overview

This node uploads files to PDF.co using either a presigned URL method or base64 encoding. It supports uploading files directly from binary data or text content, making it suitable for scenarios where users need to programmatically upload documents or images to PDF.co for further processing or storage. For example, it can be used to upload scanned documents or generated reports from an automation workflow.

Use Case Examples

  1. Uploading a PDF file from a previous node's binary data to PDF.co using a presigned URL.
  2. Uploading a small text file by providing its base64 encoded content directly.

Properties

Name Meaning
Authentication Selects the authentication method to use for the upload, either API Key or OAuth2.
Upload Method Determines the method used to upload the file, either direct upload via presigned URL or base64 encoding.
Binary File Indicates whether the file data to upload should be taken from a binary field in a previous node.
File Content The text content of the file to upload, used when not uploading binary data and using presigned URL method.
Input Binary Field The name of the binary field that holds the file to be uploaded, used when uploading binary data via presigned URL.
Base64 Content The base64 encoded content of the file to upload, used when the base64 upload method is selected.
File Name The name of the file to upload.

Output

JSON

  • fileUrl - The URL of the uploaded file on PDF.co.
  • fileName - The name of the uploaded file.
  • uploadMethod - The method used for uploading the file (presignedUrl or base64).

Dependencies

  • PDF.co API key or OAuth2 credentials

Troubleshooting

  • Ensure the correct authentication method is selected and valid credentials are provided to avoid authentication errors.
  • When using the presigned URL method, verify that the binary field name matches the actual binary data field from the previous node.
  • For base64 uploads, ensure the base64 content is correctly encoded and not corrupted.
  • File size limits apply: presigned URL supports files up to 2GB, base64 is suitable for smaller files only.

Links

Discussion