Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33221055
D7965.1768557381.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7965.1768557381.diff
View Options
diff --git a/web/input/input-state-container.react.js b/web/input/input-state-container.react.js
--- a/web/input/input-state-container.react.js
+++ b/web/input/input-state-container.react.js
@@ -308,14 +308,19 @@
const creatorID = this.props.viewerID;
invariant(creatorID, 'need viewer ID in order to send a message');
const media = uploads.map(
- ({ localID, serverID, uri, mediaType, dimensions, encryptionKey }) => {
+ ({
+ localID,
+ serverID,
+ uri,
+ mediaType,
+ dimensions,
+ encryptionKey,
+ thumbHash,
+ }) => {
// We can get into this state where dimensions are null if the user is
// uploading a file type that the browser can't render. In that case
// we fake the dimensions here while we wait for the server to tell us
- // the true dimensions. We actually don't use the dimensions on the
- // web side currently, but if we ever change that (for instance if we
- // want to render a properly sized loading overlay like we do on
- // native), 0,0 is probably a good default.
+ // the true dimensions.
const shimmedDimensions = dimensions ?? { height: 0, width: 0 };
invariant(
mediaType === 'photo' || mediaType === 'encrypted_photo',
@@ -330,7 +335,7 @@
uri,
type: 'photo',
dimensions: shimmedDimensions,
- thumbHash: null,
+ thumbHash,
};
}
invariant(
@@ -343,7 +348,7 @@
type: 'encrypted_photo',
encryptionKey,
dimensions: shimmedDimensions,
- thumbHash: null,
+ thumbHash,
};
},
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 16, 9:56 AM (14 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5943450
Default Alt Text
D7965.1768557381.diff (1 KB)
Attached To
Mode
D7965: [web] Add missing thumbhash to newly created media message
Attached
Detach File
Event Timeline
Log In to Comment