From 04ec67184e29d47d6dffde26d52a4e83f9a8bdf2 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Thu, 8 Oct 2020 12:47:48 +1100 Subject: [PATCH] Adjust the file size OR multiplier --- SignalServiceKit/src/Loki/API/FileServerAPI.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SignalServiceKit/src/Loki/API/FileServerAPI.swift b/SignalServiceKit/src/Loki/API/FileServerAPI.swift index fc2f69535..f1f3b75d4 100644 --- a/SignalServiceKit/src/Loki/API/FileServerAPI.swift +++ b/SignalServiceKit/src/Loki/API/FileServerAPI.swift @@ -11,11 +11,11 @@ public final class FileServerAPI : DotNetAPI { public static let maxFileSize = 10_000_000 // 10 MB /// The file server has a file size limit of `maxFileSize`, which the Service Nodes try to enforce as well. However, the limit applied by the Service Nodes - /// is on the **HTTP request** and not the file size. Because of onion request encryption, a file that's about 4 MB will result in a request that's about 18 MB. - /// On average the multiplier appears to be about 6, so when checking whether the file will exceed the file size limit when uploading a file we just divide + /// is on the **HTTP request** and not the file size. Because of onion request encryption, a file that's about 8 MB will result in a request that's about 10 MB. + /// On average the multiplier appears to be about 1.25, so when checking whether the file will exceed the file size limit when uploading a file we just divide /// the size of the file by this number. The alternative would be to actually check the size of the HTTP request but that's only possible after proof of work /// has been calculated and the onion request encryption has happened, which takes several seconds. - public static let fileSizeORMultiplier: Double = 6 + public static let fileSizeORMultiplier: Double = 1.25 @objc public static let server = "https://file.getsession.org"