How to copy a remote file to a public URL
Temporary attachment links and third-party download URLs are often inconvenient to store in your product. FilePost can fetch an allowed remote URL, store the bytes, and return a stable public URL for later use.
Use the URL-ingest endpoint for sources that can be fetched over HTTP(S). FilePost validates the source, applies the account's upload policy, and returns normal file metadata so your workflow can continue with one consistent URL shape.
Copy a remote file URL with FilePost
Use the authenticated FilePost upload API for a remote file URL. The endpoint returns a JSON object containing the public URL, file ID, size, content type, and filename mode.
curl -X POST https://upload.filepost.dev/v1/upload/url \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/report.pdf"}'
Example response
{
"url": "https://cdn.filepost.dev/file/…",
"file_id": "a1b2c3d4e5f6",
"name": "source-file",
"size": 84210,
"content_type": "application/octet-stream"
}
What to do with the returned URL
Replace the temporary source URL in your database or workflow with the stable URL from FilePost.
source URL → FilePost → https://cdn.filepost.dev/file/…
Good uses for remote file to URL
- Importing temporary attachment URLs
- Normalizing files from another API
- Automation steps that start with a URL
Know the boundary
URL ingestion is not a proxy or a crawler. The source must be reachable and within the endpoint's safety, size, timeout, and quota rules.
For the complete request and response contract, see the FilePost API documentation. You can also test the flow with the interactive upload on the homepage.