Attachment Storage
When using the Attachment field type, administrators can upload student-specific files (such as digital graduation certificates, report cards, or student photos) directly through the admin panel.
Oh My School supports multiple storage backends, which can be configured via environment variables in your .env file:
Storage Backends
1. Local Filesystem
Files are stored locally on the server (under storage/app/public). This is the default option and is recommended for simple, single-server setups:
FILESYSTEM_DISK=public
2. S3-Compatible Storage
Files are stored on cloud services like AWS S3, Cloudflare R2, MinIO, or DigitalOcean Spaces. This is recommended for containerized (Docker) and clustered server environments to ensure persistent file access:
FILESYSTEM_DISK=s3
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=your_bucket_name
AWS_ENDPOINT=https://your-endpoint.com
3. Database Blob Storage
Files are stored directly inside your MySQL or MariaDB database as binary large objects (BLOBs). This ensures that all application data (records and files) resides in one place, simplifying backups:
FILESYSTEM_DISK=database
Still have questions?
If you could not find what you were looking for, the community is here to help on GitHub Discussions.
Ask the Community