Skip to content

Commit

Permalink
[native][web] Flip the switch for blob-hosted media/avatar uploads
Browse files Browse the repository at this point in the history
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
  • Loading branch information
barthap committed Nov 7, 2024
1 parent dc9c299 commit b1a48f0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
3 changes: 1 addition & 2 deletions native/avatars/avatar-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 2 additions & 3 deletions native/input/input-state-container.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,8 @@ class InputStateContainer extends React.PureComponent<Props, State> {
}>,
> = new Map();
pendingThreadUpdateHandlers: Map<string, (ThreadInfo) => 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
Expand Down
3 changes: 1 addition & 2 deletions web/avatars/avatar-hooks.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 2 additions & 3 deletions web/input/input-state-container.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,8 @@ class InputStateContainer extends React.PureComponent<Props, State> {
+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
Expand Down

0 comments on commit b1a48f0

Please sign in to comment.