fix: 3 bugs in Electron export pipeline
Bug 1: RENDERS_DIR mismatch (root cause) - server.ts had hardcoded renders dir, now reads BRADLY_RENDERS_DIR env - renderQueue.ts saves to ~/Library/.../Bradly/renders/ - server.ts now serves from the same directory Bug 2: Upload origin pointing to wrong port - uploadBlobContent.ts used window.location.origin (Vite 5173) - Remotion bundler needs Express origin (3000) to access media - Added getExpressOrigin() helper that detects Electron Bug 3: Batch ZIP export using file-saver (doesn't work in Electron) - Added saveBlobFile IPC method (preload + main) - batchExporter.ts now uses native save dialog in Electron - Web mode falls back to file-saver
This commit is contained in:
@@ -190,7 +190,7 @@ export async function createExpressApp() {
|
||||
});
|
||||
|
||||
// ═══ Render Queue ═══
|
||||
const RENDERS_DIR = path.join(process.cwd(), "renders");
|
||||
const RENDERS_DIR = process.env.BRADLY_RENDERS_DIR || path.join(process.cwd(), "renders");
|
||||
if (!fs.existsSync(RENDERS_DIR)) {
|
||||
fs.mkdirSync(RENDERS_DIR, { recursive: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user