New attachment storage system

This commit is contained in:
Fedor Indutny 2024-07-11 12:44:09 -07:00 committed by GitHub
parent 273e1ccb15
commit 28664a606f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
161 changed files with 2418 additions and 1562 deletions

View file

@ -29,6 +29,7 @@ import {
systemPreferences,
Notification,
safeStorage,
protocol as electronProtocol,
} from 'electron';
import type { MenuItemConstructorOptions, Settings } from 'electron';
import { z } from 'zod';
@ -1823,6 +1824,17 @@ if (DISABLE_GPU) {
app.disableHardwareAcceleration();
}
// This has to run before the 'ready' event.
electronProtocol.registerSchemesAsPrivileged([
{
scheme: 'attachment',
privileges: {
supportFetchAPI: true,
stream: true,
},
},
]);
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.