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:
const safeName = gunner.sanitizeFilename(originalName); // Returns: "safe_file.txt" Set a hard deadline per upload in upload.yaml :
go run github.com/gunner-labs/fileupload@latest project new --output ./my-project Upon success, you will see a directory structure like this:
// Client-side (JavaScript) const uploader = new GunnerUploader( projectId: "my-upload-service", chunkSize: 5 * 1024 * 1024, parallelChunks: 3 ); uploader.upload(file, onProgress: (percent) => console.log( $percent% ), onComplete: (etag) => console.log( Upload complete: $etag ) ); Gunner projects can integrate with ClamAV or similar antivirus engines natively. During project new , you can enable this with the --with-scan flag:
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 .