Title: B2 Private Files
Author: Darwin Biler
Published: <strong>18 augustus 2022</strong>
Last modified: 18 augustus 2022

---

Plugins zoeken

Deze plugin **is niet getest met de laatste 3 grotere versies van WordPress**. Mogelijk
wordt het niet meer onderhouden of ondersteund. Ook kunnen er compatibiliteitsproblemen
ontstaan wanneer het wordt gebruikt met recentere versies van WordPress.

![](https://s.w.org/plugins/geopattern-icon/b2-private-files.svg)

# B2 Private Files

 Door [Darwin Biler](https://profiles.wordpress.org/darwinbiler/)

[Download](https://downloads.wordpress.org/plugin/b2-private-files.zip)

 * [Details](https://nl.wordpress.org/plugins/b2-private-files/#description)
 * [Beoordelingen](https://nl.wordpress.org/plugins/b2-private-files/#reviews)
 *  [Installatie](https://nl.wordpress.org/plugins/b2-private-files/#installation)
 * [Ontwikkeling](https://nl.wordpress.org/plugins/b2-private-files/#developers)

 [Ondersteuning](https://wordpress.org/support/plugin/b2-private-files/)

## Beschrijving

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.

## Installatie

Get started by following these steps:

 1. Upload `b2-private-files.zip` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Go to https://www.backblaze.com/b2/sign-up.html and signup for a BackBlaze B2 account
 4. Create a new Bucket, make sure it is a private one.
 5. Create a new app key, in Account > App Keys > Add a New Application Key
 6. In your Wordress Admin, go to Settings > B2 Private Files
 7. Fill up the Account ID / Key ID, Application Key, Bucket ID, Bucket Name

## FAQ

### Can I upload file in B2 directly?

Yes, you dont need to upload the file via WordPress admin. You can use any client
to upload large file into B2.
 The plugin will detect those and generate download
link for you.

### Can i use this as an alternative to CDN?

Its possible, but its not optimized for that use-case. As the files token is being
calculated on the fly.

## Beoordelingen

Er zijn geen beoordelingen voor deze plugin.

## Bijdragers & ontwikkelaars

“B2 Private Files” is open source software. De volgende personen hebben bijgedragen
aan deze plugin.

Bijdragers

 *   [ Darwin Biler ](https://profiles.wordpress.org/darwinbiler/)

[Vertaal “B2 Private Files” in je eigen taal.](https://translate.wordpress.org/projects/wp-plugins/b2-private-files)

### Interesse in ontwikkeling?

[Bekijk de code](https://plugins.trac.wordpress.org/browser/b2-private-files/), 
haal de [SVN repository](https://plugins.svn.wordpress.org/b2-private-files/) op,
of abonneer je op het [ontwikkellog](https://plugins.trac.wordpress.org/log/b2-private-files/)
via [RSS](https://plugins.trac.wordpress.org/log/b2-private-files/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.2

 * plugin submission requirements / fixes

#### 1.0.1

 * plugin submission requirements / fixes
 * fix bug wherein error message is not showing after upload to b2

#### 1.0.0

 * ability to configure B2 settings
 * ability to upload files to B2.
 * ability to render button shortcode
 * ability to manage files in B2 (delete and list)

## Meta

 *  Versie **1.0.2**
 *  Laatst geüpdatet **4 jaar geleden**
 *  Actieve installaties **10+**
 *  WordPress versie ** 3.0.1 of nieuwer **
 *  Getest t/m **6.0.18**
 *  Taal
 * [English (US)](https://wordpress.org/plugins/b2-private-files/)
 * Tags
 * [download](https://nl.wordpress.org/plugins/tags/download/)[media library](https://nl.wordpress.org/plugins/tags/media-library/)
   [premium content](https://nl.wordpress.org/plugins/tags/premium-content/)
 *  [Geavanceerde weergave](https://nl.wordpress.org/plugins/b2-private-files/advanced/)

## Waarderingen

Er zijn nog geen beoordelingen ingediend.

[Je beoordeling](https://wordpress.org/support/plugin/b2-private-files/reviews/#new-post)

[Bekijk alle beoordelingen](https://wordpress.org/support/plugin/b2-private-files/reviews/)

## Bijdragers

 *   [ Darwin Biler ](https://profiles.wordpress.org/darwinbiler/)

## Ondersteuning

Iets te melden? Hulp nodig?

 [Het supportforum bekijken](https://wordpress.org/support/plugin/b2-private-files/)

## Doneren

Wil je de groei van deze plugin ondersteunen?

 [ Doneer aan deze plugin ](https://www.buymeacoffee.com/kt7vrlS6F)