S3 Configuration

Configure AWS S3 storage for logos and assets

{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% endfor %} {% endif %} {% endwith %}
{{ form.hidden_tag() }}

Storage Configuration

{{ form.enable_s3(class="form-check-input") }} {{ form.enable_s3.label(class="form-check-label") }}
When enabled, logos and assets will be served from S3. When disabled, local static files will be used.
{{ form.fallback_to_static(class="form-check-input") }} {{ form.fallback_to_static.label(class="form-check-label") }}
If S3 is unavailable, fallback to local static files.

Storage Provider

{{ form.storage_provider.label(class="form-label") }} {{ form.storage_provider(class="form-select") }}
Choose between AWS S3 or MinIO (self-hosted S3-compatible storage).

Access Credentials

{{ form.aws_access_key_id.label(class="form-label") }} {{ form.aws_access_key_id(class="form-control", placeholder="AKIA...") }}
Your Access Key ID (AWS or MinIO)
{{ form.aws_secret_access_key.label(class="form-label") }} {{ form.aws_secret_access_key(class="form-control", placeholder="Enter secret key") }}
Your Secret Access Key (AWS or MinIO)
{{ form.aws_region.label(class="form-label") }} {{ form.aws_region(class="form-control") }}
Region (AWS) or leave default for MinIO

S3 Bucket Configuration

{{ form.bucket_name.label(class="form-label") }} {{ form.bucket_name(class="form-control", placeholder="my-motm-assets") }}
Name of your S3 bucket
{{ form.bucket_prefix.label(class="form-label") }} {{ form.bucket_prefix(class="form-control") }}
Prefix for objects in the bucket (e.g., motm-assets/)

URL Configuration

{{ form.use_signed_urls(class="form-check-input") }} {{ form.use_signed_urls.label(class="form-check-label") }}
Use signed URLs for secure access to private objects. If disabled, objects must be public.
{{ form.signed_url_expiry.label(class="form-label") }} {{ form.signed_url_expiry(class="form-control") }}
How long signed URLs remain valid (in seconds)
{{ form.test_connection(class="btn btn-info") }} {{ form.save_config(class="btn btn-primary") }} {{ form.cancel(class="btn btn-secondary") }}

Current Configuration

S3 Status: {{ 'Enabled' if current_config.get('enable_s3') else 'Disabled' }}
Bucket: {{ current_config.get('bucket_name', 'Not configured') }}
Region: {{ current_config.get('aws_region', 'Not configured') }}
Signed URLs: {{ 'Enabled' if current_config.get('use_signed_urls') else 'Disabled' }}

Setup Instructions

  1. Create S3 Bucket: Create an S3 bucket in your AWS account
  2. Set Permissions: Configure bucket permissions for your access key
  3. Upload Assets: Upload your logos and assets to the bucket
  4. Configure Here: Enter your credentials and bucket details above
  5. Test Connection: Use the "Test S3 Connection" button to verify
  6. Save Configuration: Save your settings to enable S3 storage
Asset Organization

Organize your assets in the S3 bucket as follows:

  • assets/images/clubs/ - Club logos
  • assets/images/ - General images
  • assets/logos/ - Alternative logo location