Delivery URLs
Every file on binedge has an address made of three parts: your space name, a hostname role that says what the address is for, and the object key.
https://<space>.<role>.binedge.net/<object key>?<parameters>Hostname roles
Section titled “Hostname roles”| Role | Hostname | Bucket | Methods | Signature |
|---|---|---|---|---|
edge |
<space>.edge.binedge.net |
Public, read only | GET, HEAD |
Only with image parameters |
vault |
<space>.vault.binedge.net |
Private, read only | GET, HEAD |
Always, with exp |
upload |
<space>.upload.binedge.net |
Private, write only | PUT, POST, PATCH, HEAD, OPTIONS |
Always, with exp, max_bytes and types |
Analytics events go to <space>.collect.binedge.net, which is described with the analytics SDKs.
Object keys
Section titled “Object keys”The path is the full object key, including the environment prefix:
| Prefix | Use |
|---|---|
production/ |
Files written by your production servers |
shared/ |
Files used by every environment, signed with the production key |
dev/ |
Files written by development and test servers |
A key is at most 1023 bytes of UTF-8. It cannot contain control characters or . and .. segments.
Encoding the path
Section titled “Encoding the path”Encode each path segment with RFC 3986 percent-encoding and keep the / between segments. The signature is calculated over the decoded key, so the same file always has the same signature however the path is written.
| Object key | Path in the URL |
|---|---|
production/tickets/截图 1.png |
/production/tickets/%E6%88%AA%E5%9B%BE%201.png |
dev/support-tickets/7/a+b%c~d.pdf |
/dev/support-tickets/7/a%2Bb%25c~d.pdf |
shared/logos/g 1.png |
/shared/logos/g%201.png |
A + in the path is a plus sign, not a space.
Caching
Section titled “Caching”- Public files on
edgeare cached at edge locations. When the content of a file changes, upload it under a new key instead of overwriting the old one, so that visitors never get a stale copy. - Resized images on
edgeare cached for a year under the full URL, including the parameters. - Responses from
vaultare never cached:Cache-Control: private, no-store. vaultsupportsRangerequests, so video and audio players can seek.
Errors
Section titled “Errors”On edge and vault, a request that fails with 403, 404 or a server error is redirected to https://www.binedge.net/404, so a visitor sees a page instead of an error body. upload returns the error itself, as JSON:
{"error":{"class":"not_found","message":"...","retryable":false,"platform_code":null,"platform_message":null,"operation_id":null}}| HTTP | class |
Typical cause |
|---|---|---|
| 403 | permission_denied |
Missing, wrong or expired signature, see Signed URLs |
| 404 | not_found |
No file under this key, or an expired resumable upload |
| 422 | validation_failed |
An invalid key or parameter, a file type or size outside the limits, or a Range outside the file |