前言介紹
- 這款 WordPress 外掛「B2 Private Files」是 2022-08-17 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2022-08-18,距離現在已有 990 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.0.1 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
download | media library | digital rights | protect assets | premium content |
內容簡介
如果你擁有一些數位產品(例如可下載的 PDF、MP3 或 MP4 等檔案)預設只能由已註冊或已付費的使用者使用,將它們上傳到標準的媒體庫可能會出現以下問題:
wp-content/uploads 目錄中的檔案是公開可訪問的,任何人都可以直接下載該檔案
大型檔案,例如電影或軟體安裝程式,會拖慢整個網站的速度(特別是當多個使用者正在下載時)
此外掛可通過傳遞令牌到 URL 來保護您的網站使用者安全地分享檔案。例如,這是在 B2 Backblaze 中託管的檔案:
https://f001.backblazeb2.com/file/wp-b2-private-files/key.jpg?Authorization=4_0018c3b251e15120000000012_01a459bb_2f35e1_acct_QGJ-TljNx-NqgRLi1dff_XGJjlQ=
請注意,只是輸入 https://f001.backblazeb2.com/file/wp-b2-private-files/key.jpg 將無法訪問該檔案,因為該檔案受到令牌保護。
當您的文章或頁面呈現時,這個外掛會生成 Authorization 參數的值。這個令牌只能從您的網站生成,因此其他網站無法爬行您的網站並抓取檔案。
每個生成的令牌還可以配置在 N 分鐘后過期。因此,如果您生成了一個大型安裝程式的下載鏈接,人們無法將同一鏈接重複使用並公開貼在論壇、聊天室等地方。
由於鏈接會在幾分鐘後過期,因此對於非註冊使用者,他們很難分享檔案。
使用方法
到「媒體」>「新增(私密)」
上傳任何檔案
到「媒體」>「庫(私密)」
按下你上傳的檔案「短碼」
將短碼貼到任何您想顯示的位置
一般來說,短碼長得像這樣:
[b2-private-file-button filename=”my-installer.zip”]
以上短碼將生成一個標題帶有「下載」字樣的按鈕,指向 Backblaze B2 檔案,並傳遞令牌。
原文外掛簡介
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
Go to Media > Add New (Private)
Upload any file
Go to Media > Library (Private)
Click “Shortcode” for the file you just uploaded
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.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「B2 Private Files」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
暫無相關外掛推薦。