- fileupload gunner project new
- fileupload gunner project new
Fileupload Gunner Project New Page
go run github.com/gunner-labs/fileupload@latest project new --output ./my-project Upon success, you will see a directory structure like this:
Save this file and run the validation command:
fileupload gunner project new --with-scan --scan-threshold strict Every uploaded file is scanned in a separate Goroutine/Worker without blocking the upload acknowledgment. Infected files are moved to a quarantine bucket, and the original uploader receives a 451 HTTP status code (Unavailable For Legal Reasons). Unlike standard rate limiters that use fixed windows, Gunner implements a token bucket with leaky bucket fallback , adapting to current system load. Configure it in gunner.workers.yaml : fileupload gunner project new
project_name: "my-upload-service" version: "2.0" upload: max_file_size: 10737418240 # 10GB allowed_mime_types: - image/jpeg - image/png - application/pdf - video/mp4 chunk_size: 5242880 # 5MB chunks temp_storage: "/tmp/gunner_uploads" final_storage: type: "s3" bucket: "gunner-files" endpoint: "https://s3.amazonaws.com"
final_storage: streaming: true s3_multipart_threshold: 5242880 # 5MB This reduces disk I/O by 70% in high-load scenarios. Set these Redis keyspace parameters for large files: go run github
gunner: workers: 8 retry_attempts: 3 dead_letter_queue: "failed_uploads" monitoring: prometheus_port: 9090
npx gunner-cli project new --type fileupload --name my-upload-service Or if using the Go-based Gunner: Configure it in gunner
grep temp_storage ./config/upload.yaml To achieve maximum performance from your fileupload gunner project new deployment, apply these optimizations: Tuning the Worker Pool Gunner’s default worker count equals your CPU cores. For I/O-bound uploads (network + disk), increase workers to 2x CPU cores . For CPU-bound scanning, reduce to 0.5x cores .