Strip metadata in the ExifTool worker during upload preview.
Cache stripped blobs, show original vs stripped metadata tabs, and keep user-facing errors on fixed store messages with console logging for diagnostics.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
export function toArrayBuffer(data: unknown): ArrayBuffer | null {
|
||||
if (data instanceof ArrayBuffer) {
|
||||
return data;
|
||||
}
|
||||
|
||||
if (data instanceof Uint8Array) {
|
||||
const { buffer, byteOffset, byteLength } = data;
|
||||
|
||||
if (buffer instanceof ArrayBuffer) {
|
||||
return buffer.slice(byteOffset, byteOffset + byteLength);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user