Adds Network Resource Uploading for admins. (#6904)

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
Vera Aguilera Puerto
2022-03-26 12:46:37 +01:00
committed by GitHub
parent 5954b7668c
commit eb54f4b224
21 changed files with 2657 additions and 6 deletions

View File

@@ -737,5 +737,37 @@ namespace Content.Shared.CCVar
public static readonly CVarDef<string> DestinationFile =
CVarDef.Create("autogen.destination_file", "", CVar.SERVER | CVar.SERVERONLY);
/*
* Network Resource Manager
*/
/// <summary>
/// Controls whether new resources can be uploaded by admins.
/// Does not prevent already uploaded resources from being sent.
/// </summary>
public static readonly CVarDef<bool> ResourceUploadingEnabled =
CVarDef.Create("netres.enabled", true, CVar.REPLICATED | CVar.SERVER);
/// <summary>
/// Controls the data size limit in megabytes for uploaded resources. If they're too big, they will be dropped.
/// Set to zero or a negative value to disable limit.
/// </summary>
public static readonly CVarDef<float> ResourceUploadingLimitMb =
CVarDef.Create("netres.limit", 3f, CVar.REPLICATED | CVar.SERVER);
/// <summary>
/// Whether uploaded files will be stored in the server's database.
/// This is useful to keep "logs" on what files admins have uploaded in the past.
/// </summary>
public static readonly CVarDef<bool> ResourceUploadingStoreEnabled =
CVarDef.Create("netres.store_enabled", true, CVar.SERVER | CVar.SERVERONLY);
/// <summary>
/// Numbers of days before stored uploaded files are deleted. Set to zero or negative to disable auto-delete.
/// This is useful to free some space automatically. Auto-deletion runs only on server boot.
/// </summary>
public static readonly CVarDef<int> ResourceUploadingStoreDeletionDays =
CVarDef.Create("netres.store_deletion_days", 30, CVar.SERVER | CVar.SERVERONLY);
}
}