Skip to content

Support Direct dem file upload for S3 object storage #378

@FlowingSPDG

Description

@FlowingSPDG

Hello! It's been a while since I was so away from CS2 for long time!

I had a automated tournament system with G5API, but we had difficulties with uploading dem files since dem file easily exceeds 150Mb which hits most storage service's limit.

If i could upload dem file to S3 directly, it is going be awesome for tournament mangers and league runners.

I am thinking to add these changes if that's okay for both of us:

  1. Add CVAR e.g. matchzy_demo_upload_s3
[ConsoleCommand("matchzy_demo_upload_s3", "Whether upload demo to S3 is enabled or not. Default value: false")]
public void MatchZyDemoUploadS3Convar(CCSPlayerController? player, CommandInfo command)
{
     if (player != null) return;
     string args = command.ArgString;
     isDemoUploadS3Enabled = bool.TryParse(args, out bool isDemoUploadS3EnabledValue) ? isDemoUploadS3EnabledValue : args != "0" && isDemoUploadS3Enabled;
}
  1. Once Server finished recording demo, check matchzy_demo_upload_s3
  2. Upload for pre-signed URL with S3-compatible HTTP request(PUT)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions