preserve file modes for up- and downloads - fixes #4141

This commit is contained in:
Eugene Pankov
2021-07-10 20:39:45 +02:00
parent 3e61630c6a
commit 0008b2f022
6 changed files with 35 additions and 13 deletions

View File

@@ -21,6 +21,7 @@ export interface MessageBoxResult {
export abstract class FileTransfer {
abstract getName (): string
abstract getMode (): number
abstract getSize (): number
abstract close (): void
@@ -95,7 +96,7 @@ export abstract class PlatformService {
abstract loadConfig (): Promise<string>
abstract saveConfig (content: string): Promise<void>
abstract startDownload (name: string, size: number): Promise<FileDownload|null>
abstract startDownload (name: string, mode: number, size: number): Promise<FileDownload|null>
abstract startUpload (options?: FileUploadOptions): Promise<FileUpload[]>
startUploadFromDragEvent (event: DragEvent, multiple = false): FileUpload[] {
@@ -188,6 +189,10 @@ export class HTMLFileUpload extends FileUpload {
return this.file.name
}
getMode (): number {
return 0o644
}
getSize (): number {
return this.file.size
}