asxpio/lib
Sergei Poljanski 4c10221727
All checks were successful
Build and Deploy to Production / test (push) Successful in 27s
Build and Deploy to Production / build (push) Successful in 1m3s
Build and Deploy to Production / deploy (push) Successful in 40s
admin: publish files to the public bucket
There was no way to put a file up for public use short of running an
S3 client with the uploader key. Add a "files" area to the admin:
upload one or more files, copy the link, edit the note, replace the
contents under the same link, delete. It has its own read/write/delete
permission flags like the other areas, and every action is audited.

The objects go to the storage stack's public bucket and are served by
Garage at s3.asxp.io/public/<key>, not by this app. The app's key can
only put and delete there, so a public_files table is the record of
what was published. Keys get a random prefix: links are not guessable
and names never collide.

That host is same-site with the admin, so a file that can carry script
must not render there. Only a fixed list of types (images, PDF, plain
text, audio, video) is served inline; the rest, HTML and SVG included,
is stored as an attachment. Image metadata is stripped by default, as
for the bingo photos, because of GPS tags.

A per-file limit and a total quota keep the small disk on asxpio-ops
from filling up.

Assisted-by: Claude:fable-5-2
2026-11-12 05:52:10 +04:00
..
admin_acl.rb admin: publish files to the public bucket 2026-11-12 05:52:10 +04:00
admin_auth.rb admin: send /admin/ to /admin, also after login 2026-10-18 10:39:10 +04:00
audit.rb admin: user management, invites, password reset, audit log 2026-10-10 08:31:42 +04:00
bingo.rb bingo: add VK to the providers 2026-10-18 09:31:27 +04:00
bingo_admin.rb bingo: add a reachability monitor for the status page 2026-10-18 10:31:00 +04:00
bingo_monitor.rb bingo: add a reachability monitor for the status page 2026-10-18 10:31:00 +04:00
crypto_asset.rb invoices: self-contained payout addresses 2026-10-10 09:17:09 +04:00
crypto_qr.rb invoices: self-contained payout addresses 2026-10-10 09:17:09 +04:00
crypto_rate.rb invoices: self-contained payout addresses 2026-10-10 09:17:09 +04:00
db.rb admin: user management, invites, password reset, audit log 2026-10-10 08:31:42 +04:00
files_admin.rb admin: publish files to the public bucket 2026-11-12 05:52:10 +04:00
fmt.rb invoices: multi-crypto payment support 2026-07-03 02:01:57 +04:00
gel_rate.rb nbg and auto fill GEL exchange rate 2026-06-08 19:29:25 +03:00
invoice.rb invoices: self-contained payout addresses 2026-10-10 09:17:09 +04:00
invoice_pdf.rb invoices: self-contained payout addresses 2026-10-10 09:17:09 +04:00
invoice_stats.rb invoices: self-contained payout addresses 2026-10-10 09:17:09 +04:00
mailer.rb mailer: send account emails as "asxp.io admin" 2026-10-10 08:50:30 +04:00
payout_address.rb invoices: self-contained payout addresses 2026-10-10 09:17:09 +04:00
public_file.rb admin: publish files to the public bucket 2026-11-12 05:52:10 +04:00
rate_limit.rb rate limit: prune stale keys so @hits cannot grow unbounded 2026-07-02 17:31:19 +04:00
s3.rb admin: publish files to the public bucket 2026-11-12 05:52:10 +04:00
user.rb admin: publish files to the public bucket 2026-11-12 05:52:10 +04:00
users_admin.rb admin: invite links without a username 2026-10-10 09:12:21 +04:00