mirror of
https://codeberg.org/vlw/blobber.git
synced 2025-09-13 16:23:41 +02:00
A very simple object store for uploading and sharing public, unlisted, immutable binaries.
public | ||
src | ||
.env.example.ini | ||
.gitignore | ||
composer.json | ||
composer.lock | ||
LICENSE | ||
README.md |
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+
- Clone this repo
- Install dependencies with Composer
composer install --optimize-autoloader
- Make a copy of the enviroment variable file
cp -p .env.example.ini .env.ini
- 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
- 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 - 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;
}
}