You're trying to use Postman with PDF.co but encounter the following error:
"Please set url to the link to a source file or upload a file and set as a source."
Why This Happens
This error occurs when the API call you're making references a source file that doesn't exist, is incorrectly formatted, or is not accessible via a proper URL. The system requires a valid file URL or an uploaded file to process the request.
How to Resolve the Error
To provide a valid source file, you have two main options:
Option 1: Upload the File to PDF.co
Use the /v1/file/upload/get-presigned-url endpoint to:
Generate a temporary upload URL.
Upload your file.
Use the returned file URL as your source file link.
Option 2: Use a Cloud File Link
You can also host your file using services like:
Google Drive (with public sharing)
Dropbox (with direct download link)
Amazon S3 or similar
Then, provide the direct file link as the url in your API call.
Helpful Tips
Ensure the file link is publicly accessible or use the presigned URL method.
Always check if the URL ends in a file name and doesn't redirect.
If using Postman, confirm the
url
parameter is correctly placed in the request body.