Encoded-file workflow

HEX to URL, with the decode step explicit

Decode a hex string into bytes in your application, upload the file to FilePost, and receive a public CDN URL.

Get free API key 1 provisional / 15 verified uploads/mo · no credit card

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.

HEX to URL FAQ

Does FilePost decode HEX automatically?

No. Hex is an encoding of bytes, so decode and validate it in your application first, then upload the resulting bytes to POST /v1/upload.

Can I host the hex text itself?

Yes. Save the text as a .hex or .txt file and upload it if that is what you want to share. The decode workflow is for serving the original binary payload.

Which content type should decoded HEX use?

Use the MIME type of the decoded file when you know it, such as application/pdf or image/png. Use application/octet-stream for an unknown binary payload.

Ready to turn HEX data into a file URL?

Start free, make one API request, and keep the returned CDN URL in your app or workflow.

Get free API key 1 provisional / 15 verified uploads/mo · no credit card