> For the complete documentation index, see [llms.txt](https://docs.podigee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.podigee.com/documentation/start-here/ai-agents/transfer-media-encode-and-publish/upload-local-media-with-an-http-client.md).

# Upload local media with an HTTP client

Use Podigee upload controls and direct HTTPS PUT requests from a capable client.

Use this path when your client can call MCP tools and stream the local file through HTTPS.

## Before you start

* Prepare the exact filename, byte size, and content type.
* Authenticate to the canonical Podigee MCP resource with media write access.
* Keep signed URLs out of logs and conversations.

## Upload the file

1. Call `create_upload` with the file metadata and a stable idempotency key.
2. Read the returned mode, part count, part size, and `upload_id`.
3. For a single upload, request the URL for part 1.
4. For a multipart upload, request one part URL at a time for every part number.
5. Send `PUT` to the returned URL with the exact `Content-Type` and `Content-Length` headers.
6. Send exactly the declared bytes for that part.
7. Renew an expired part URL through `get_upload_part_url`.
8. Call `complete_upload` after every part is present.
9. Inspect the session until it reports `completed`.

Do not parse, modify, store, or expose the signed URL. Treat it as an opaque temporary secret.

## Expected result

Podigee validates the transferred bytes and returns a completed upload session with a public `upload_id` and no provider object URL.

## If a part fails

Inspect `get_upload`, identify completed parts, request a new URL only for the missing part, and continue the same session.

## Next step

[Complete or abort an upload](/documentation/start-here/ai-agents/transfer-media-encode-and-publish/complete-or-abort-an-upload.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.podigee.com/documentation/start-here/ai-agents/transfer-media-encode-and-publish/upload-local-media-with-an-http-client.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
