Drag upload support.

This commit is contained in:
marko1616
2024-08-22 08:05:37 +08:00
parent aa105bdf4d
commit 3c5f2ba28c
5 changed files with 50 additions and 21 deletions

View File

@@ -301,7 +301,7 @@ class ElectronFileUpload extends FileUpload {
private buffer: Buffer
private powerSaveBlocker = 0
constructor (private filePath: string, private electron: ElectronService, private relativePath = '') {
constructor (private filePath: string, private electron: ElectronService, private relativePath: string|null = null ) {
super()
this.buffer = Buffer.alloc(256 * 1024)
this.powerSaveBlocker = electron.powerSaveBlocker.start('prevent-app-suspension')
@@ -318,7 +318,7 @@ class ElectronFileUpload extends FileUpload {
return path.basename(this.filePath)
}
getRelativePath (): string {
getRelativePath (): string|null {
return this.relativePath
}