How to turn HEX data into a URL
Hexadecimal data is a representation of bytes, not a file format that FilePost needs to interpret. The reliable flow is simple: decode the string in your app, send the resulting bytes as a normal multipart upload, then save the returned URL.
Making the decode step explicit avoids silently hosting the text representation instead of the original file. The example below turns a hex payload into a binary file in Python; the same pattern works in Node, Go, or any language with byte decoding.
Upload decoded HEX bytes with FilePost
Use the authenticated FilePost upload API for decoded HEX bytes. The endpoint returns a JSON object containing the public URL, file ID, size, content type, and filename mode.
import requests
hex_payload = "255044462d312e34"
file_bytes = bytes.fromhex(hex_payload)
response = requests.post(
"https://upload.filepost.dev/v1/upload",
headers={"X-API-Key": "YOUR_API_KEY"},
files={"file": ("payload.bin", file_bytes, "application/octet-stream")},
)
print(response.json()["url"])
Example response
{
"url": "https://cdn.filepost.dev/file/…",
"file_id": "a1b2c3d4e5f6",
"name": "payload.bin",
"size": 84210,
"content_type": "application/octet-stream"
}
What to do with the returned URL
Use the returned URL for the decoded file, not for the original hex text, in the application or workflow that needs it.
https://cdn.filepost.dev/file/… ← URL for the decoded bytes
Good uses for hex to URL
- Binary payloads stored as hex strings
- Device or protocol dumps
- Developer tools that need to publish decoded bytes
Know the boundary
FilePost does not guess whether a string is hex or decode it automatically. Decode and validate the bytes before upload so the content type and filename match the file you intend to serve.
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.