Remove (mostly) unused protocol requirement

This commit is contained in:
Max Radermacher 2026-01-22 15:25:48 -06:00 committed by GitHub
parent 8e8e2ba03f
commit 7b34072667
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 12 deletions

View File

@ -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<Metadata: UploadMetadata> {

View File

@ -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.