mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-05 18:48:41 +00:00
this is a LOT, i should've commited in stages but oh well, from what i can remember:
- paste interactions (reactions)
- comments
- comment interactions (reactions)
- rich text editor
- move all report apis into report controller
- rename size to sizeStored
- rename trueSize to originalSize
- fixed compression on paste compression
- implemented compression threshold
- use longs instead of ints where possible in the entities
- improve record view + remove redundant check for existing view
21 lines
813 B
C#
21 lines
813 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace SharpbinV3.Server.Settings
|
|
{
|
|
public class PasteSettings
|
|
{
|
|
public HashSet<string> ValidSyntaxLanguages { get; set; } = [];
|
|
public int MaxTitleLength { get; set; } = 500;
|
|
public int MaxPasteSizeInBytes { get; set; } = 1_048_576; // 1 MB
|
|
public bool EnablePasteCompression { get; set; } = true;
|
|
public double CompressionThreshold { get; set; } = 0.9; // only store compressed if reduced by at least 10%
|
|
public bool RequiresVerification { get; set; } = true;
|
|
|
|
[Required, MinLength(32), MaxLength(128)]
|
|
public string View_HMAC_Secret { get; set; } = string.Empty;
|
|
|
|
[MinLength(32), MaxLength(128)]
|
|
public string View_Internal_API_Key { get; set; } = string.Empty;
|
|
}
|
|
}
|