From 7b34072667f0b8b64f569e24db21dbf5abc8da53 Mon Sep 17 00:00:00 2001 From: Max Radermacher Date: Thu, 22 Jan 2026 15:25:48 -0600 Subject: [PATCH] Remove (mostly) unused protocol requirement --- SignalServiceKit/Upload/Upload.swift | 10 ---------- SignalServiceKit/Upload/UploadMetadata.swift | 2 -- 2 files changed, 12 deletions(-) diff --git a/SignalServiceKit/Upload/Upload.swift b/SignalServiceKit/Upload/Upload.swift index 5a52e9dd36..d7b6c7ff83 100644 --- a/SignalServiceKit/Upload/Upload.swift +++ b/SignalServiceKit/Upload/Upload.swift @@ -133,10 +133,6 @@ public enum Upload { /// Metadata related to the SVRB nonce used for forward secrecy that should be persisted /// after upload success. let nonceMetadata: BackupExportPurpose.NonceMetadata? - - /// We don't enforce a size limit locally for backups; we let the server - /// enforce the limit and fail the upload if we surpass it. - public static var maxUploadSizeBytes: UInt64 { .max } } public struct LocalUploadMetadata: AttachmentUploadMetadata, Codable { @@ -165,10 +161,6 @@ public enum Upload { public let fileUrl: URL /// The length of the file. public let encryptedDataLength: UInt32 - - /// We don't enforce a size limit locally for backups; we let the server - /// enforce the limit and fail the upload if we surpass it. - public static var maxUploadSizeBytes: UInt64 { .max } } public struct ReusedUploadMetadata: AttachmentUploadMetadata { @@ -189,8 +181,6 @@ public enum Upload { public let encryptedDataLength: UInt32 public var isReusedTransitTierUpload: Bool { true } - - public static var maxUploadSizeBytes: UInt64 { OWSMediaUtils.kMaxAttachmentUploadSizeBytes } } public struct Result { diff --git a/SignalServiceKit/Upload/UploadMetadata.swift b/SignalServiceKit/Upload/UploadMetadata.swift index 14d76bc1af..cc642ab67c 100644 --- a/SignalServiceKit/Upload/UploadMetadata.swift +++ b/SignalServiceKit/Upload/UploadMetadata.swift @@ -8,8 +8,6 @@ import Foundation /// Applies to attachment uploads, backup proto uploads, etc. public protocol UploadMetadata { var encryptedDataLength: UInt32 { get } - - static var maxUploadSizeBytes: UInt64 { get } } /// Includes extra info like digest for validation.