# Drop to CDN for Pipedream

> Upload files from Pipedream workflows and get instant CDN URLs. Copy-paste Node.js step or HTTP request with your API key.

Drop to CDN works in Pipedream without installing an app. Add a Node.js code step or the built-in HTTP request action, authenticate with your API key, and the step returns a public CDN URL you can pass to any other step.

## Use Drop to CDN in Pipedream

Three steps to upload from a workflow.

- Get your API key: sign up at Drop to CDN and create a key in Dashboard → Settings (starts with dtc_).
- Store it in Pipedream: add an environment variable named DROPTOCDN_API_KEY to your project.
- Add a Node.js code step: paste a snippet or use the HTTP request action with a Bearer token — the step returns the public CDN URL.

## Copy-paste code steps

Node.js code steps for Pipedream workflows.

- Upload a file saved in /tmp: build a FormData with the file, then POST it to https://api.droptocdn.com/v1/files with the header Authorization: Bearer ${process.env.DROPTOCDN_API_KEY}. The response JSON has id, url, expires_at, size, mime_type, original_name — export url for later steps.
- Copy a file from a URL: fetch the source URL, keep its filename from Content-Disposition or the URL path, append the blob to FormData under the field file, and POST it to the same endpoint with the same Bearer header.
- In both cases, throw an error when the response is not ok so the workflow step fails visibly instead of passing on an empty URL.

## API calls

Base URL https://api.droptocdn.com/v1 with a Bearer API key.

- Upload File — POST /v1/files (multipart, field: file). Outputs: id, url, expires_at, size, mime_type, original_name.
- Get File Information — GET /v1/files/:id. Outputs: id, url, expires_at, size, mime_type, original_name.
- Delete File — DELETE /v1/files/:id. Returns 204 No Content.

## Pipedream workflow examples

Common patterns in Pipedream workflows.

- Webhook → CDN URL: receive a file on a Pipedream HTTP trigger, upload it, and return the CDN URL in the HTTP response.
- Generated file → shareable link: save a PDF, image, or export to /tmp in a code step, upload it, and pass the public url to Slack, email, or a database.
- Pipeline cleanup: delete files by ID after delivery so storage stays within your plan.

## Pipedream integration FAQ

Common questions about using Drop to CDN in Pipedream.

### Is there an official Drop to CDN app in Pipedream?

Not yet. Drop to CDN is a plain REST API, so any Pipedream workflow can call it from a Node.js code step or the built-in HTTP request action.

### Where do I get an API key?

Sign up at Drop to CDN, open Dashboard → Settings → API keys, and create a key (starts with dtc_). Store it as a Pipedream environment variable.

### Can I use the HTTP request action instead of code?

Yes. POST to https://api.droptocdn.com/v1/files with an Authorization: Bearer dtc_… header and a multipart body whose file field holds the file.

### What does the upload return?

id, url, expires_at, size, mime_type, and original_name. Reference steps.your_step.$return_value.url in later steps.

### Can I set retention or never expire?

Add retention_days or never_expire as extra form fields on paid plans. On Free, leave them out — files use the 7-day plan default.

### Do Pipedream uploads count toward my quota?

Yes. Each successful upload counts like any API upload. Check usage in your Drop to CDN dashboard.

## More from Drop to CDN

- [Home](https://droptocdn.com/)
- [Pricing](https://droptocdn.com/pricing)
- [API Docs](https://droptocdn.com/docs)
- [Image to CDN](https://droptocdn.com/image-to-cdn)
- [Video to CDN](https://droptocdn.com/video-to-cdn)
- [PDF to CDN](https://droptocdn.com/pdf-to-cdn)
- [n8n Integration](https://droptocdn.com/integrations/n8n)
- [Zapier Integration](https://droptocdn.com/integrations/zapier)
- [Make Integration](https://droptocdn.com/integrations/make)
- [Pipedream Integration](https://droptocdn.com/integrations/pipedream)
- [Activepieces Integration](https://droptocdn.com/integrations/activepieces)
- [MCP (Cursor, Claude)](https://droptocdn.com/integrations/mcp)
- [CLI (agents & terminal)](https://droptocdn.com/integrations/cli)
- [Buffer Integration](https://droptocdn.com/integrations/buffer)
- [Loom to CDN](https://droptocdn.com/loom-to-cdn)
- [Privacy Policy](https://droptocdn.com/privacy)
- [Terms of Service](https://droptocdn.com/terms)

- [Site index for agents (llms.txt)](https://droptocdn.com/llms.txt)
- [XML sitemap](https://droptocdn.com/sitemap.xml)
- [OpenAPI specification](https://api.droptocdn.com/v1/openapi.json)

---

Canonical HTML page: https://droptocdn.com/integrations/pipedream
