crypsol_storage 0.1.0

AWS S3 storage library for Rust services with image processing, validation, and thumbnail generation.
Documentation
########################################
# Crypsol Storage - Environment Variables
########################################
# ⚠️ SECURITY WARNING: Never commit actual .env files!
# Copy this file to .env for your environment
########################################

########################################
# AWS S3 Configuration (Required)
########################################
# Get credentials from: https://console.aws.amazon.com/iam/
# Create IAM user with S3 permissions:
#   - s3:PutObject
#   - s3:GetObject
#   - s3:DeleteObject
#   - s3:HeadObject (for file_exists checks)

# AWS Access Key ID
S3_AWS_ACCESS_KEY=your-aws-access-key-id

# AWS Secret Access Key
S3_AWS_SECRET_KEY=your-aws-secret-access-key

# AWS Region (e.g., us-east-1, eu-west-1, ap-south-1)
S3_AWS_REGION=us-east-1

# S3 Bucket Name
# ⚠️ Bucket must be created beforehand with appropriate CORS settings
S3_BUCKET_NAME=crypsol-storage

########################################
# Optional Configuration
########################################

# Public Base URL for accessing files
# If using CloudFront CDN or custom domain, set it here
# Default: https://{bucket}.s3.{region}.amazonaws.com
S3_PUBLIC_BASE_URL=

# Maximum file upload size in megabytes (default: 5MB)
S3_MAX_FILE_SIZE_MB=5

########################################
# S3 Bucket CORS Configuration
########################################
# Add this CORS configuration to your S3 bucket:
#
# [
#   {
#     "AllowedHeaders": ["*"],
#     "AllowedMethods": ["GET", "PUT", "POST", "DELETE", "HEAD"],
#     "AllowedOrigins": ["https://your-frontend-domain.com"],
#     "ExposeHeaders": ["ETag"],
#     "MaxAgeSeconds": 3600
#   }
# ]

########################################
# S3 Bucket Policy (Optional - for public read)
########################################
# If you want images to be publicly readable:
#
# {
#   "Version": "2012-10-17",
#   "Statement": [
#     {
#       "Sid": "PublicReadGetObject",
#       "Effect": "Allow",
#       "Principal": "*",
#       "Action": "s3:GetObject",
#       "Resource": "arn:aws:s3:::your-bucket-name/*"
#     }
#   ]
# }

########################################
# Supported Image Formats
########################################
# The following image formats are supported:
# - image/jpeg (.jpg, .jpeg)
# - image/png (.png)
# - image/gif (.gif)
# - image/webp (.webp)

########################################
# Image Processing
########################################
# Profile images are automatically resized:
# - Main image: 200x200 pixels
# - Thumbnail: 50x50 pixels
# - Format: Same as uploaded (JPEG, PNG, GIF, WebP)
# - Quality: High (Lanczos3 filter)