Add feature to delete uploaded files with uploader and admin permissions

This commit is contained in:
tyuXX 2026-10-31 16:45:58 +03:00
parent 7cc9ba7f4d
commit 45629b122e
16 changed files with 587 additions and 8 deletions

View file

@ -70,3 +70,10 @@ public class UploadFileResponse
public string? ChannelId { get; set; }
public string? ErrorMessage { get; set; }
}
public class DeleteFileResponse
{
public bool Success { get; set; }
public string? FileId { get; set; }
public string? ErrorMessage { get; set; }
}

View file

@ -26,6 +26,7 @@ public static class MessageTypes
public const string FetchHistory = "FETCH_HISTORY";
public const string UserListSync = "USER_LIST_SYNC";
public const string FileListSync = "FILE_LIST_SYNC";
public const string DeleteFile = "DELETE_FILE";
public const string SystemNotice = "SYSTEM_NOTICE";
public const string Error = "ERROR";
public const string ExecuteCommand = "EXECUTE_COMMAND";
@ -204,9 +205,15 @@ public class FileSummary
public string ContentType { get; set; } = string.Empty;
public long FileSizeBytes { get; set; }
public string UploaderUsername { get; set; } = string.Empty;
public string UploaderId { get; set; } = string.Empty;
public System.DateTime CreatedAt { get; set; }
}
public class DeleteFilePacket
{
public string FileId { get; set; } = string.Empty;
}
public class FileListSyncPacket
{
public List<FileSummary> Files { get; set; } = new();