You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "PG1204 (via GitHub)" <gi...@apache.org> on 2026/08/19 22:31:14 UTC
[PR] fix(amber, frontend): inline Hugging Face audio uploads as data URLs instead of a server temp file [texera]
PG1204 opened a new pull request, #7790:
URL: https://github.com/apache/texera/pull/7790
### What changes were proposed in this PR?
The Hugging Face operator's **Audio Upload** widget now captures the selected file entirely in the browser and stores it as a self-contained `data:audio/…;base64,…` URL, instead of relying on a server-side temp file.
Previously the upload ended up as a server-side temp file reference. In a distributed deployment the Python worker that runs the inference is a different process than the web server, so it could not read that path, the uploaded audio never reached the model. The widget now reads the file client-side (`FileReader.readAsDataURL`) and stores the data URL as the operator's `audioInput` value, so it travels inside the workflow JSON and the generated Python's `_read_audio_input` decodes it directly. This mirrors the existing **Image Upload** widget's data-URL approach.
A 25 MB size cap and input guards ("Choose an audio file.", "Audio file is too large (max 25 MB).", "Could not read this audio file.") are added since base64 inlining bloats the workflow JSON, along with an inline `<audio>` preview and a Clear button.
### Any related issues?
Closes #6968
### How was this PR tested?
Frontend unit tests, plus a manual UI check: on the `automatic-speech-recognition` task, selecting an audio file shows an inline player and stores the value as a `data:audio/…;base64,…` URL (verified in the console). The size cap, invalid-file guard, and Clear button all behave as expected.
<img width="1275" height="549" alt="image" src="https://github.com/user-attachments/assets/2c43240d-86a8-4b64-9063-89a568a5444a" />
### Was this PR authored or co-authored using generative AI tooling?
Yes, this PR was co-authored with Claude in compliance with ASF policy.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber, frontend): inline Hugging Face audio uploads as data URLs instead of a server temp file [texera]
Posted by "PG1204 (via GitHub)" <gi...@apache.org>.
PG1204 commented on PR #7790:
URL: https://github.com/apache/texera/pull/7790#issuecomment-5874347633
> @PG1204, ty for applying fixes and responding to the review. Since none of the issues were blocking, I approved this PR 2 weeks ago.
>
> <img alt="Image" width="1537" height="254" src="https://private-user-images.githubusercontent.com/182038479/660364037-1b2aef84-406f-427c-8722-4c9e028771d1.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTA2MTM2MDQsIm5iZiI6MTc5MDYxMzMwNCwicGF0aCI6Ii8xODIwMzg0NzkvNjYwMzY0MDM3LTFiMmFlZjg0LTQwNmYtNDI3Yy04NzIyLTRjOWUwMjg3NzFkMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwOTI4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDkyOFQxNjM1MDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yYTJjYTEyMjg1NzU4ODBkZjgwOTZmYWI2NTZkMjZmNmQ0ZjJiYmQ2ODY1NzE0MDQzNWVhZWZjZGJkM2JiNjgzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.FjZ9gNerT3d3bEEQzX8fcEigy3BnH-EgaalYfcPYxM4">
> I approved it again now. Overall, it LGTM! I don't think we need a long discussion; they were minor issues, and I trust your discretion.
@Ma77Ball Thanks for the review and approval.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber, frontend): inline Hugging Face audio uploads as data URLs instead of a server temp file [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7790:
URL: https://github.com/apache/texera/pull/7790#issuecomment-5348825816
<!-- texera-benchmarks-comment -->
## ⚠️ Benchmark changes need a look
🟢 2 better · 🔴 6 worse · ⚪ 7 noise (<±5%) · 0 without baseline
> Compared against main `c927890` benchmarked on **this same runner**, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.
[Dashboard](https://apache.github.io/texera/dev/bench/) · [Run](https://github.com/apache/texera/actions/runs/32309201318)
| | config | throughput | MB/s | latency | max Δ latest / 7d |
|---|---|---:|---:|---:|---:|
| 🔴 | bs=10 sw=10 sl=64 | 485 | 0.296 | 17,802/51,753/51,753 us | 🔴 +100.3% / 🔴 +231.9% |
| 🔴 | bs=100 sw=10 sl=64 | 1,227 | 0.749 | 78,387/108,065/108,065 us | 🔴 +8.4% / 🟢 +23.1% |
| 🟢 | bs=1000 sw=10 sl=64 | 1,430 | 0.873 | 700,537/740,069/740,069 us | 🟢 -6.8% / 🟢 +37.9% |
<details><summary>Baseline details</summary>
Latest main `c927890` from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---:|---:|---:|---:|---:|
| bs=10 sw=10 sl=64 | throughput | 485 tuples/sec | 567 tuples/sec | 771.02 tuples/sec | -14.5% | -37.1% |
| bs=10 sw=10 sl=64 | MB/s | 0.296 MB/s | 0.346 MB/s | 0.471 MB/s | -14.5% | -37.1% |
| bs=10 sw=10 sl=64 | p50 | 17,802 us | 18,688 us | 12,749 us | -4.7% | +39.6% |
| bs=10 sw=10 sl=64 | p95 | 51,753 us | 25,836 us | 15,594 us | +100.3% | +231.9% |
| bs=10 sw=10 sl=64 | p99 | 51,753 us | 25,836 us | 19,320 us | +100.3% | +167.9% |
| bs=100 sw=10 sl=64 | throughput | 1,227 tuples/sec | 1,219 tuples/sec | 997.05 tuples/sec | +0.7% | +23.1% |
| bs=100 sw=10 sl=64 | MB/s | 0.749 MB/s | 0.744 MB/s | 0.609 MB/s | +0.7% | +23.1% |
| bs=100 sw=10 sl=64 | p50 | 78,387 us | 81,813 us | 100,339 us | -4.2% | -21.9% |
| bs=100 sw=10 sl=64 | p95 | 108,065 us | 99,697 us | 106,781 us | +8.4% | +1.2% |
| bs=100 sw=10 sl=64 | p99 | 108,065 us | 99,697 us | 113,101 us | +8.4% | -4.5% |
| bs=1000 sw=10 sl=64 | throughput | 1,430 tuples/sec | 1,401 tuples/sec | 1,037 tuples/sec | +2.1% | +37.9% |
| bs=1000 sw=10 sl=64 | MB/s | 0.873 MB/s | 0.855 MB/s | 0.633 MB/s | +2.1% | +37.9% |
| bs=1000 sw=10 sl=64 | p50 | 700,537 us | 715,645 us | 971,388 us | -2.1% | -27.9% |
| bs=1000 sw=10 sl=64 | p95 | 740,069 us | 794,037 us | 1,013,249 us | -6.8% | -27.0% |
| bs=1000 sw=10 sl=64 | p99 | 740,069 us | 794,037 us | 1,039,879 us | -6.8% | -28.8% |
</details>
<details><summary>Raw CSV</summary>
```csv
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,412.37,200,128000,485,0.296,17802.47,51753.00,51753.00
1,100,10,64,20,1630.27,2000,1280000,1227,0.749,78386.87,108064.75,108064.75
2,1000,10,64,20,13984.42,20000,12800000,1430,0.873,700536.53,740069.14,740069.14
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber, frontend): inline Hugging Face audio uploads as data URLs instead of a server temp file [texera]
Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on code in PR #7790:
URL: https://github.com/apache/texera/pull/7790#discussion_r3986956247
##########
frontend/src/app/workspace/component/hugging-face-audio-upload/hugging-face-audio-upload.component.ts:
##########
@@ -94,51 +67,34 @@ export class HuggingFaceAudioUploadComponent extends FieldType<FieldTypeConfig>
input.value = "";
return;
}
- this.revokePreviewUrl();
- const previewUrl = URL.createObjectURL(file);
- this.localPreviewUrl = previewUrl;
- this.isUploading = true;
+ if (file.size > MAX_AUDIO_BYTES) {
+ this.errorMessage = "Audio file is too large (max 25 MB).";
+ input.value = "";
+ return;
+ }
Review Comment:
**What is wrong:** the two reject branches (non-audio at line 65, over-cap here at 70-74) set `errorMessage` and `return` without clearing any previously stored value.
**Why it matters:** if the user already selected a valid clip and then picks an invalid or oversized file, `formControl.value` and `fileName` still hold the old clip, so the `<audio>` preview keeps playing and the operator runs the *previous* audio while the UI shows an error, a silent wrong-input. The reject tests all start from an empty control, so this path is uncovered.
**Suggested fix:** reset selection state in both reject branches. Extract a small `resetSelection(input)` that clears the form value, `fileName`, and `input.value`, and call it where you currently only set `errorMessage`. If keeping the last valid clip is intentional, say so in a comment so the error-plus-preview state is not read as a bug.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber, frontend): inline Hugging Face audio uploads as data URLs instead of a server temp file [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #7790:
URL: https://github.com/apache/texera/pull/7790#issuecomment-5348841154
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/7790?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `93.10345%` with `2 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 91.24%. Comparing base ([`c927890`](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`04a8320`](https://app.codecov.io/gh/apache/texera/commit/04a8320cd87a229a98267fe7ae5d053477c5139e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/texera/pull/7790?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...io-upload/hugging-face-audio-upload.component.html](https://app.codecov.io/gh/apache/texera/pull/7790?src=pr&el=tree&filepath=frontend%2Fsrc%2Fapp%2Fworkspace%2Fcomponent%2Fhugging-face-audio-upload%2Fhugging-face-audio-upload.component.html&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZnJvbnRlbmQvc3JjL2FwcC93b3Jrc3BhY2UvY29tcG9uZW50L2h1Z2dpbmctZmFjZS1hdWRpby11cGxvYWQvaHVnZ2luZy1mYWNlLWF1ZGlvLXVwbG9hZC5jb21wb25lbnQuaHRtbA==) | 0.00% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/texera/pull/7790?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...udio-upload/hugging-face-audio-upload.component.ts](https://app.codecov.io/gh/apache/texera/pull/7790?src=pr&el=tree&filepath=frontend%2Fsrc%2Fapp%2Fworkspace%2Fcomponent%2Fhugging-face-audio-upload%2Fhugging-face-audio-upload.component.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZnJvbnRlbmQvc3JjL2FwcC93b3Jrc3BhY2UvY29tcG9uZW50L2h1Z2dpbmctZmFjZS1hdWRpby11cGxvYWQvaHVnZ2luZy1mYWNlLWF1ZGlvLXVwbG9hZC5jb21wb25lbnQudHM=) | 96.42% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/texera/pull/7790?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #7790 +/- ##
============================================
- Coverage 91.25% 91.24% -0.02%
+ Complexity 4471 4458 -13
============================================
Files 1171 1171
Lines 47124 46999 -125
Branches 5286 5260 -26
============================================
- Hits 43003 42884 -119
+ Misses 2447 2444 -3
+ Partials 1674 1671 -3
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/7790/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
|---|---|---|---|
| [access-control-service](https://app.codecov.io/gh/apache/texera/pull/7790/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `81.00% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [agent-service](https://app.codecov.io/gh/apache/texera/pull/7790/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `98.62% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [amber](https://app.codecov.io/gh/apache/texera/pull/7790/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `87.97% <ø> (-0.05%)` | :arrow_down: | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/7790/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.67% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [config-service](https://app.codecov.io/gh/apache/texera/pull/7790/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `86.73% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [file-service](https://app.codecov.io/gh/apache/texera/pull/7790/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `68.90% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [frontend](https://app.codecov.io/gh/apache/texera/pull/7790/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `92.63% <93.10%> (+<0.01%)` | :arrow_up: | |
| [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/7790/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.74% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [pyamber](https://app.codecov.io/gh/apache/texera/pull/7790/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `97.57% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/7790/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.19% <ø> (ø)` | | Carriedforward from [c927890](https://app.codecov.io/gh/apache/texera/commit/c927890160a8701c1b8ecb4fc4cc17711ea011ad?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
*This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/7790?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber, frontend): inline Hugging Face audio uploads as data URLs instead of a server temp file [texera]
Posted by "PG1204 (via GitHub)" <gi...@apache.org>.
PG1204 commented on PR #7790:
URL: https://github.com/apache/texera/pull/7790#issuecomment-6000683883
@xuang7 I want to follow up with you regarding the review of this PR. I have applied all changes to all of the suggestions.
Requesting your review on the changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber, frontend): inline Hugging Face audio uploads as data URLs instead of a server temp file [texera]
Posted by "xuang7 (via GitHub)" <gi...@apache.org>.
xuang7 commented on PR #7790:
URL: https://github.com/apache/texera/pull/7790#issuecomment-5389317430
Could you take a look at this fix? @Ma77Ball
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber, frontend): inline Hugging Face audio uploads as data URLs instead of a server temp file [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7790:
URL: https://github.com/apache/texera/pull/7790#issuecomment-5348783482
<!-- backport-auto-label-report -->
### Backport auto-label report
This `fix:` PR was checked against each actively-supported release branch. `release/*` labels drive the post-merge backport, so add or remove one to change where this fix lands.
| Release branch | Analysis |
| --- | --- |
| ✅ `release/v1.2` | Change detected on this branch — label added; this fix is queued to backport here. Requested review from @xuang7. |
_[Auto-label run](https://github.com/apache/texera/actions/runs/32309187031)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber, frontend): inline Hugging Face audio uploads as data URLs instead of a server temp file [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7790:
URL: https://github.com/apache/texera/pull/7790#issuecomment-5348784088
<!-- texera-reviewer-suggestion -->
### Automated Reviewer Suggestions
Based on the `git blame` history of the changed files, we recommend the following reviewers:
- **Contributors with relevant context:** `@ELin2025`, `@aglinxinyuan`, `@juliethecao`
You can notify them by mentioning `@ELin2025`, `@aglinxinyuan`, `@juliethecao` in a comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber, frontend): inline Hugging Face audio uploads as data URLs instead of a server temp file [texera]
Posted by "PG1204 (via GitHub)" <gi...@apache.org>.
PG1204 commented on PR #7790:
URL: https://github.com/apache/texera/pull/7790#issuecomment-5862166793
hi @Ma77Ball , any update on the changes made to the suggestions?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber, frontend): inline Hugging Face audio uploads as data URLs instead of a server temp file [texera]
Posted by "PG1204 (via GitHub)" <gi...@apache.org>.
PG1204 commented on code in PR #7790:
URL: https://github.com/apache/texera/pull/7790#discussion_r3992113248
##########
frontend/src/app/workspace/component/hugging-face-audio-upload/hugging-face-audio-upload.component.ts:
##########
@@ -94,51 +67,34 @@ export class HuggingFaceAudioUploadComponent extends FieldType<FieldTypeConfig>
input.value = "";
return;
}
- this.revokePreviewUrl();
- const previewUrl = URL.createObjectURL(file);
- this.localPreviewUrl = previewUrl;
- this.isUploading = true;
+ if (file.size > MAX_AUDIO_BYTES) {
+ this.errorMessage = "Audio file is too large (max 25 MB).";
+ input.value = "";
+ return;
+ }
Review Comment:
addressed P2 in [32ec88e](https://github.com/apache/texera/pull/7790/commits/32ec88e7919fdefb476b60dcb7d005631cd2a8a6)
For P3, I don't think it works, because the later data:audio/ check reads the same type the early check found empty. readAsDataURL builds the data URL's media type from file.type, so an empty type produces data:;base64,…, which that guard rejects anyway. The file still gets turned away, just later and with a less accurate message ("Could not read this audio file." when reading actually worked).
Genuinely accepting empty-MIME audio would mean loosening the pre-check, the data:audio/ guard, and the hasAudio getter that drives the preview, plus confirming _read_audio_input handles a non-audio/ data URL, and we'd lose the guarantee that the stored value is audio. Happy to do it if you think it's worth it, I just felt it's bigger than a nit. (Reasoning from the FileReader contract, not a browser run.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(amber, frontend): inline Hugging Face audio uploads as data URLs instead of a server temp file [texera]
Posted by "xuang7 (via GitHub)" <gi...@apache.org>.
xuang7 merged PR #7790:
URL: https://github.com/apache/texera/pull/7790
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org