A very simple object store for uploading and sharing public, unlisted, immutable binaries.
Find a file
2024-09-16 13:34:02 +00:00
public Initial code commit 2024-09-16 15:13:02 +02:00
src Initial code commit 2024-09-16 15:13:02 +02:00
.env.example.ini Initial code commit 2024-09-16 15:13:02 +02:00
.gitignore Initial code commit 2024-09-16 15:13:02 +02:00
composer.json Initial code commit 2024-09-16 15:13:02 +02:00
composer.lock Initial code commit 2024-09-16 15:13:02 +02:00
LICENSE Initial commit 2024-09-13 13:12:02 +00:00
README.md doc: add README 2024-09-16 13:34:02 +00:00

Blobber (BETA)

A very simple object store for uploading and sharing public, unlisted, immutable binaries.

Examples

These examples will use a blob with the following properties:

id MIME-type
0191fabf-6f31-7850-aa09-599532ddaa24 image/webp

Inline

HTTP GET Request: https://example.com/0191fabf-6f31-7850-aa09-599532ddaa24

Accepts: */*
HTTP 200 Response: <BINARY_DATA>

Content-Type: image/webp
Content-Disposition: inline

Installation

Prerequisites: PHP 8.3+ and MariaDB 14+

  1. Clone this repo
  2. Install dependencies with Composer
composer install --optimize-autoloader
  1. Make a copy of the enviroment variable file
cp -p .env.example.ini .env.ini
  1. Import the database structure. Create a new database and import the SQL from /src/database/blobber.sql
mysql -e "CREATE DATABASE blobber"
mysql blobber < ./src/database/blobber.sql
  1. Set the following required properties
    key description
    blob_storage_path An absolute path to a directory (with or without tailing slash) where uploaded blobs will be stored
    mariadb_* MariaDB database credentials
  2. Configure your web server. All requests should be routed to the PHP file at /public/index.php. Here is an example configuration for NGINX:
# You might need to alter this block to suit your NGINX configuration
# The important thing is that all requests should be routed to /public/index.php

server {
	listen 80;
	server_name _;

	root /var/www/blobber/public;

	location / {
		try_files /index.php =503;
		
		include snippets/fastcgi-php.conf;
		fastcgi_pass unix:/run/php/php8.3-fpm.sock;
	}
}