From b1a48f05876fea6d5895d06acfd765c4febff761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Klocek?= Date: Thu, 7 Nov 2024 10:11:20 +0100 Subject: [PATCH] [native][web] Flip the switch for blob-hosted media/avatar uploads Summary: Flip the switch for enabling blob-hosted multimedia. Depends on D13890 Test Plan: Verified in MariaDB that new uploads have empty content column and instead have the (blob hash, holder) pair. Checked native/web, both avatars and multimedia meessages. Reviewers: ashoat Reviewed By: ashoat Subscribers: tomek Differential Revision: https://phab.comm.dev/D13891 --- native/avatars/avatar-hooks.js | 3 +-- native/input/input-state-container.react.js | 5 ++--- web/avatars/avatar-hooks.react.js | 3 +-- web/input/input-state-container.react.js | 5 ++--- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/native/avatars/avatar-hooks.js b/native/avatars/avatar-hooks.js index 31648ecf16..670b774c16 100644 --- a/native/avatars/avatar-hooks.js +++ b/native/avatars/avatar-hooks.js @@ -44,8 +44,7 @@ import Alert from '../utils/alert.js'; import blobServiceUploadHandler from '../utils/blob-service-upload.js'; import { useStaffCanSee } from '../utils/staff-utils.js'; -// TODO: flip the switch -const useBlobServiceUploads = false; +const useBlobServiceUploads = true; function displayAvatarUpdateFailureAlert(): void { Alert.alert( diff --git a/native/input/input-state-container.react.js b/native/input/input-state-container.react.js index ba0039688e..9d6478c395 100644 --- a/native/input/input-state-container.react.js +++ b/native/input/input-state-container.react.js @@ -191,9 +191,8 @@ class InputStateContainer extends React.PureComponent { }>, > = new Map(); pendingThreadUpdateHandlers: Map mixed> = new Map(); - // TODO: flip the switch - // Note that this enables Blob service for encrypted media only - useBlobServiceUploads = false; + + useBlobServiceUploads = true; // When the user sends a multimedia message that triggers the creation of a // sidebar, the sidebar gets created right away, but the message needs to wait diff --git a/web/avatars/avatar-hooks.react.js b/web/avatars/avatar-hooks.react.js index 72c54c496a..eaa0c6299d 100644 --- a/web/avatars/avatar-hooks.react.js +++ b/web/avatars/avatar-hooks.react.js @@ -14,8 +14,7 @@ import { encryptFile } from '../media/encryption-utils.js'; import { generateThumbHash } from '../media/image-utils.js'; import { validateFile } from '../media/media-utils.js'; -// TODO: flip the switch -const useBlobServiceUploads = false; +const useBlobServiceUploads = true; type AvatarMediaUploadOptions = { +uploadMetadataToKeyserver?: boolean, diff --git a/web/input/input-state-container.react.js b/web/input/input-state-container.react.js index d8a20611f8..4b83995450 100644 --- a/web/input/input-state-container.react.js +++ b/web/input/input-state-container.react.js @@ -212,9 +212,8 @@ class InputStateContainer extends React.PureComponent { +threadType: ThreadType, }>, >(); - // TODO: flip the switch - // Note that this enables Blob service for encrypted media only - useBlobServiceUploads = false; + + useBlobServiceUploads = true; // When the user sends a multimedia message that triggers the creation of a // sidebar, the sidebar gets created right away, but the message needs to wait