π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Use nid
Manav Rathie17bc10d6776
diff --git a/web/packages/new/photos/services/ffmpeg/web.ts b/web/packages/new/photos/services/ffmpeg/web.tsindex 1c206a4c26..cec054a78c 100644--- a/web/packages/new/photos/services/ffmpeg/web.ts+++ b/web/packages/new/photos/services/ffmpeg/web.ts@@ -1,3 +1,4 @@+import { newID } from "@/base/id";import log from "@/base/log";import { FFmpeg } from "@ffmpeg/ffmpeg";import {@@ -54,9 +55,9 @@ const ffmpegExec = async (outputFileExtension: string,blob: Blob,) => {- const inputPath = randomPrefix();+ const inputPath = newID("in_");const outputSuffix = outputFileExtension ? "." + outputFileExtension : "";- const outputPath = randomPrefix() + outputSuffix;+ const outputPath = newID("out_") + outputSuffix;const cmd = substitutePlaceholders(command, inputPath, outputPath);@@ -88,17 +89,6 @@ const ffmpegExec = async (}};-/** Generate a random string suitable for being used as a file name prefix */-const randomPrefix = () => {- const alphabet =- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";-- let result = "";- for (let i = 0; i < 10; i++)- result += alphabet[Math.floor(Math.random() * alphabet.length)]!;- return result;-};-const substitutePlaceholders = (command: string[],inputFilePath: string,