diff --git a/packages/backend/src/server/FileServerService.ts b/packages/backend/src/server/FileServerService.ts index 183f7cb8d7cc..3cb353f2b341 100644 --- a/packages/backend/src/server/FileServerService.ts +++ b/packages/backend/src/server/FileServerService.ts @@ -262,7 +262,6 @@ export class FileServerService { const parts = range.replace(/bytes=/, '').split('-'); const start = parseInt(parts[0], 10); let end = parts[1] ? parseInt(parts[1], 10) : file.file.size - 1; - console.log(end); if (end > file.file.size) { end = file.file.size - 1; } @@ -529,6 +528,9 @@ export class FileServerService { if (!file.storedInternal) { if (!(file.isLink && file.uri)) return '204'; const result = await this.downloadAndDetectTypeFromUrl(file.uri); + if (!file.size) { + file.size = (await fs.promises.stat(result.path)).size; + } return { ...result, url: file.uri,