From 4a9a547bf750ff2b377e81af88db36e137522416 Mon Sep 17 00:00:00 2001 From: Alexander Onnikov Date: Fri, 30 May 2025 14:06:53 +0700 Subject: [PATCH 1/4] fix: correct filename in content-disposition header (#9139) Signed-off-by: Alexander Onnikov --- .vscode/launch.json | 8 +++----- services/datalake/pod-datalake/src/handlers/blob.ts | 7 +++++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index cb4d54a67d..dc4db4087a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -367,9 +367,7 @@ "METRICS_CONSOLE": "true", "ACCOUNTS_URL": "http://localhost:3000", "MONGO_URL": "mongodb://localhost:27017", - "MINIO_ACCESS_KEY": "minioadmin", - "MINIO_SECRET_KEY": "minioadmin", - "MINIO_ENDPOINT": "localhost" + "STORAGE_CONFIG": "datalake|http://localhost:4030" }, "runtimeVersion": "20", "runtimeArgs": ["--nolazy", "-r", "ts-node/register"], @@ -763,8 +761,8 @@ "env": { "PORT": "4030", "SECRET": "secret", - "DB_URL": "", - "BUCKETS": "", + "DB_URL": "postgresql://root@localhost:26257/defaultdb?sslmode=disable", + "BUCKETS": "blobs,eu|http://localhost:9000?accessKey=minioadmin&secretKey=minioadmin", "ACCOUNTS_URL": "http://localhost:3000", "STATS_URL": "http://huly.local:4900", "STREAM_URL": "http://huly.local:1080/recording" diff --git a/services/datalake/pod-datalake/src/handlers/blob.ts b/services/datalake/pod-datalake/src/handlers/blob.ts index b16305ba27..658384c5b5 100644 --- a/services/datalake/pod-datalake/src/handlers/blob.ts +++ b/services/datalake/pod-datalake/src/handlers/blob.ts @@ -70,7 +70,7 @@ export async function handleBlobGet ( res.setHeader('Content-Security-Policy', "default-src 'none';") res.setHeader( 'Content-Disposition', - filename !== undefined ? `attachment; filename*=UTF-8''${encodeURIComponent(filename)}"` : 'attachment' + filename !== undefined ? `attachment; filename*=UTF-8''${encodeURIComponent(filename)}` : 'attachment' ) res.setHeader('Cache-Control', blob.cacheControl ?? cacheControl) res.setHeader('Last-Modified', new Date(blob.lastModified).toUTCString()) @@ -122,7 +122,10 @@ export async function handleBlobHead ( res.setHeader('Content-Length', head.size.toString()) res.setHeader('Content-Type', head.contentType ?? '') res.setHeader('Content-Security-Policy', "default-src 'none';") - res.setHeader('Content-Disposition', filename !== undefined ? `attachment; filename="${filename}"` : 'attachment') + res.setHeader( + 'Content-Disposition', + filename !== undefined ? `attachment; filename*=UTF-8''${encodeURIComponent(filename)}` : 'attachment' + ) res.setHeader('Cache-Control', head.cacheControl ?? cacheControl) res.setHeader('Last-Modified', new Date(head.lastModified).toUTCString()) res.setHeader('ETag', wrapETag(head.etag)) From 96c6e4f6f43f17eca0a77c9c57b2a8b1b4d39fc1 Mon Sep 17 00:00:00 2001 From: Alexander Onnikov Date: Fri, 30 May 2025 18:30:39 +0700 Subject: [PATCH 2/4] UBERF-9731 Some recorder fixes (#9140) Signed-off-by: Alexander Onnikov --- .../src/components/AttachmentPresenter.svelte | 4 +- .../src/components/RecordingPopup.svelte | 9 +++- .../src/components/SettingsPopup.svelte | 14 ++---- plugins/recorder-resources/src/recorder.ts | 46 ++++++++++++++++++- plugins/recorder-resources/src/recording.ts | 7 ++- .../recorder-resources/src/screen-recorder.ts | 4 +- plugins/recorder-resources/src/types.ts | 2 +- 7 files changed, 66 insertions(+), 20 deletions(-) diff --git a/plugins/attachment-resources/src/components/AttachmentPresenter.svelte b/plugins/attachment-resources/src/components/AttachmentPresenter.svelte index 1491258d50..3a1661ed53 100644 --- a/plugins/attachment-resources/src/components/AttachmentPresenter.svelte +++ b/plugins/attachment-resources/src/components/AttachmentPresenter.svelte @@ -180,7 +180,7 @@ {:else} {#await getBlobRef(value.file, value.name, sizeToWidth('large')) then valueRef}
- {#if value.size != null}{filesize(value.size, { spacer: '' })}{/if} + {#if value.size != null && value.size !== 0}{filesize(value.size, { spacer: '' })}{/if} diff --git a/plugins/recorder-resources/src/components/RecordingPopup.svelte b/plugins/recorder-resources/src/components/RecordingPopup.svelte index 4a2c5ae528..e356f83c86 100644 --- a/plugins/recorder-resources/src/components/RecordingPopup.svelte +++ b/plugins/recorder-resources/src/components/RecordingPopup.svelte @@ -103,6 +103,7 @@ $: if (state !== null && state.state === 'stopped') { dispatch('close') + recording.set(null) } async function updateCameraStream ( @@ -269,6 +270,8 @@ async function handleStopRecording (): Promise { await stopRecording() + camEnabled = false + micEnabled = false } async function handleRestartRecording (): Promise { @@ -412,6 +415,8 @@ } function onKeyDown (e: KeyboardEvent): void { + if (state?.state === 'stopping') return + if (e.key === 'Enter') { e.preventDefault() e.stopPropagation() @@ -455,7 +460,7 @@ >
{#if state !== null && state.state === 'stopped'} -
OK
+ {:else if mainStream === null}
{#if cameraStreamPromise === null} @@ -590,6 +595,8 @@ icon={IconStop} iconProps={{ size: 'small' }} label={plugin.string.Stop} + disabled={state.state === 'stopping'} + loading={state.state === 'stopping'} noFocus on:click={handleStopRecording} /> diff --git a/plugins/recorder-resources/src/components/SettingsPopup.svelte b/plugins/recorder-resources/src/components/SettingsPopup.svelte index 2c27f456cc..a384d0c5b5 100644 --- a/plugins/recorder-resources/src/components/SettingsPopup.svelte +++ b/plugins/recorder-resources/src/components/SettingsPopup.svelte @@ -1,15 +1,15 @@