Send anyone a link to a page with a preview of the file and a download button. The page follows the file's read access, so a private file stays private.
A share page lives at
https://fileboy.io/f/FILE_IDPrograms, scripts, archives, HTML and SVG files get a short note asking people to only open them from someone they trust. HTML is never rendered on the page.
A file has no share page until you turn it on. In the dashboard, open the file and use the switch on its Share & embed tab, which also has the link to copy. From code it is the
sharePagePATCH /files/FILE_ID// needs the private key
await fileboy.updateFileData(id, { sharePage: true })
const link = fileboy.buildSharePageUrl(id)
// https://fileboy.io/f/2a860257-ecf9-424a-846e-00ab68e2fd58
// turn it off: the link stops working at once
await fileboy.updateFileData(id, { sharePage: false })# needs the private key
fileboy.update_file(id, share_page: true)
link = fileboy.build_share_page_url(id)
# => "https://fileboy.io/f/2a860257-ecf9-424a-846e-00ab68e2fd58"
# turn it off: the link stops working at once
fileboy.update_file(id, share_page: false)# needs the private key
client.update_file(file_id, share_page=True)
link = client.build_share_page_url(file_id)
# "https://fileboy.io/f/2a860257-ecf9-424a-846e-00ab68e2fd58"
# turn it off: the link stops working at once
client.update_file(file_id, share_page=False)// needs the private key
$fileboy->updateFile($id, ['sharePage' => true]);
$link = $fileboy->buildSharePageUrl($id);
// https://fileboy.io/f/2a860257-ecf9-424a-846e-00ab68e2fd58
// turn it off: the link stops working at once
$fileboy->updateFile($id, ['sharePage' => false]);curl -X PATCH https://api.fileboy.io/files/$ID \
-H "Authorization: token YOUR_SIGNED_TOKEN" \
-H "Content-Type: application/json" \
-d '{"sharePage": true}'
# the page's data, as the page itself reads it
curl https://api.fileboy.io/files/$ID/shareTurning it off stops the page at once, for everyone, including signed links you have already sent. It never changes the file's own URLs. Image copies Fileboy makes and the files inside a video never have a share page.
The page asks for the file with the same rules as every other read, described in Signed URLs:
Sign the page URL on your server, exactly like any other read. The page passes the signature to Fileboy, which hands it a preview and a download signed with the same expiry and address range. When the link expires, the page, the preview and the download all stop working.
// on your server, for a file that needs a signed URL. The page's preview and
// download are signed for the same week, and stop working with the link.
const link = fileboy.signSharePageUrl(id, { expiresIn: 7 * 24 * 3600 })
// https://fileboy.io/f/2a86...?fb_exp=1800000000&fb_sig=...# on your server, for a file that needs a signed URL
link = fileboy.sign_share_page_url(id, expires_in: 7 * 24 * 3600)
# => "https://fileboy.io/f/2a86...?fb_exp=1800000000&fb_sig=..."# on your server, for a file that needs a signed URL
link = client.sign_share_page_url(file_id, expires_in=7 * 24 * 3600)
# "https://fileboy.io/f/2a86...?fb_exp=1800000000&fb_sig=..."// on your server, for a file that needs a signed URL
$link = $fileboy->signSharePageUrl($id, expiresIn: 7 * 24 * 3600);
// https://fileboy.io/f/2a86...?fb_exp=1800000000&fb_sig=...# The same signature as any other read, with scope=share and the file id
EXP=$(( $(date +%s) + 7 * 24 * 3600 ))
CANON=$(printf 'FBS1\nscope=share\nid=%s\ntransform=\nfilename=\nexp=%s\nip=' "$ID" "$EXP")
SIG=$(printf '%s' "$CANON" | openssl dgst -sha256 -hmac "$PRIVATE_KEY" -binary | openssl base64 -A | tr '+/' '-_' | tr -d '=')
echo "https://fileboy.io/f/$ID?fb_exp=$EXP&fb_sig=$SIG"A share link only opens the page. A signature made for the file itself (
/files/get/FILE_IDipIn the dashboard, Preview the page opens it with a link signed for the next few hours, so you can see what people will get.
Pasted into Slack, Teams, iMessage, WhatsApp, X, LinkedIn or Discord, the link unfurls with the file's name and a line like
PDF · 2.4 MB. Shared with Fileboy.og:videoog:audioShare pages are always sent with
noindex, nofollowThe page reads
GET https://api.fileboy.io/files/FILE_ID/shareaccesspublicsignedexpiresAtviewdownloadimagessrcsetthumbnailfb_expfb_sigfb_ip404 share_page_not_found401 signature_required403 signature_expiredsignature_invalidip_not_allowedAnswers are kept by the browser for at most a minute, and never by a shared cache, so turning a page off reaches everyone within a minute.
PATCH /files/FILE_ID