Limit the images that previews keep.

A preview that fails the captcha or the form token keeps no image. A session keeps one image, the directory has a size limit, and abandoned images go at the next upload.
This commit is contained in:
tim
2026-09-26 15:27:51 +02:00
parent fe30a0aaa1
commit c4fcef21aa
8 changed files with 215 additions and 42 deletions
+5
View File
@@ -25,6 +25,11 @@ GOOGLE_ANALYTICS_ID=
# web root. The default is xxx-uploads in the system temporary directory.
UPLOAD_DIR=
# The most that the upload directory holds, in megabytes (default 100).
# Past this, previews do not keep new images. Abandoned uploads are
# removed after a day.
UPLOAD_DIR_LIMIT_MB=
# Show PHP errors in the page (1) or on stderr (stderr). Leave it empty in
# production: errors always go to the PHP error log.
DISPLAY_ERRORS=