跳到内容

B2 Private Files

v1.0.2

Darwin Biler · 2022年8月18日 上架

Serve token-protected files hosted in Backblaze B2 in your WordPress Site

正在使用
10+
评分
暂无
累计下载
1,449
最近更新
2022年8月18日
需要 WordPress 3.0.1+已测试到 6.0.19

贡献者

If you have a digital products (downloadable pdf, mp3, mp4 etc) that is supposedly being accessed by registered/paying users, uploading them into the standard media library have problems:

  • the files in wp-content/uploads is publicly accessible, and anyone can basically download the file directly there
  • huge files like movies or software installers will weigh your entire website down (specially when multiple users is gonna be downloading them)

This plugin allows you to securely share files to your website users by passing a token to the url. For example, here is a file hosted in B2 Backblaze

https://f001.backblazeb2.com/file/wp-b2-private-files/key.jpg?Authorization=4_0018c3b251e15120000000012_01a459bb_2f35e1_acct_QGJ-TljNx-NqgRLi1dff_XGJjlQ=

note that simply accessing https://f001.backblazeb2.com/file/wp-b2-private-files/key.jpg wont work, as the file is token-protected.
the plugin generates the value for Authorization parameter when your post/page is rendered. The token can be only generated from your website, thus its impossible for any other site to crawl your site and scrape the files.

Each token generated can be also configured to expire after N minutes. So if lets say you generated a download link to a big installer, people cant re-use the same link and paste it in public forums, chats etc.
Because the link will expire after few minutes, which makes it hard for user to share file to non-registered users.

Usage

  1. Go to Media > Add New (Private)
  2. Upload any file
  3. Go to Media > Library (Private)
  4. Click “Shortcode” for the file you just uploaded
  5. Paste the shortcode anywhere you wanted to show the link

Generally the shortcode looks like this:

[b2-private-file-button filename=”my-installer.zip”]

the above shortcode will generate a button with caption “Download”, pointing to the Backblaze B2 file with token passed to it.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums