Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33116843
D7976.1768486914.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
D7976.1768486914.diff
View Options
diff --git a/native/media/encryption-utils.js b/native/media/encryption-utils.js
--- a/native/media/encryption-utils.js
+++ b/native/media/encryption-utils.js
@@ -22,6 +22,7 @@
import type { MediaResult } from './media-utils.js';
import { commUtilsModule } from '../native-modules.js';
import * as AES from '../utils/aes-crypto-module.js';
+import { arrayBufferFromBlob } from '../utils/blob-utils-module.js';
const PADDING_THRESHOLD = 5000000; // we don't pad files larger than this
@@ -63,7 +64,8 @@
data = new Uint8Array(buffer);
} else {
const response = await fetch(getFetchableURI(uri));
- const buffer = await response.arrayBuffer();
+ const blob = await response.blob();
+ const buffer = arrayBufferFromBlob(blob);
data = new Uint8Array(buffer);
}
} catch (e) {
@@ -296,8 +298,9 @@
if (!response.ok) {
throw new Error(`HTTP error ${response.status}: ${response.statusText}`);
}
- const buf = await response.arrayBuffer();
- data = new Uint8Array(buf);
+ const blob = await response.blob();
+ const buffer = arrayBufferFromBlob(blob);
+ data = new Uint8Array(buffer);
} catch (e) {
success = false;
exceptionMessage = getMessageForException(e);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 15, 2:21 PM (1 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5930592
Default Alt Text
D7976.1768486914.diff (1 KB)
Attached To
Mode
D7976: [native] Use BlobUtils for media encryption/decryption
Attached
Detach File
Event Timeline
Log In to Comment