Title: Stream blob uploads when digest/size are already known (no temp files) · Issue #508 · oras-project/oras-java · GitHub
Open Graph Title: Stream blob uploads when digest/size are already known (no temp files) · Issue #508 · oras-project/oras-java
X Title: Stream blob uploads when digest/size are already known (no temp files) · Issue #508 · oras-project/oras-java
Description: What would you like to be added? Current OCI.pushBlob(ref, InputStream) spools to a temp file first (src/main/java/land/oras/OCI.java:109). Add a streaming upload overload for the remote registry path, scoped to the "digest already known...
Open Graph Description: What would you like to be added? Current OCI.pushBlob(ref, InputStream) spools to a temp file first (src/main/java/land/oras/OCI.java:109). Add a streaming upload overload for the remote registry p...
X Description: What would you like to be added? Current OCI.pushBlob(ref, InputStream) spools to a temp file first (src/main/java/land/oras/OCI.java:109). Add a streaming upload overload for the remote registry p...
Opengraph URL: https://github.com/oras-project/oras-java/issues/508
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Stream blob uploads when digest/size are already known (no temp files)","articleBody":"### What would you like to be added?\n\nCurrent `OCI.pushBlob(ref, InputStream)` spools to a temp file first (`src/main/java/land/oras/OCI.java:109`).\n\nAdd a streaming upload overload for the remote registry path, scoped to the \"digest already known\" case:\n\n- New API (Registry):\n `Layer pushBlob(ContainerRef refWithDigest, long size, Supplier\u003cInputStream\u003e stream, Map\u003cString,String\u003e annotations)`\n\nConstraints / behavior:\n- `refWithDigest.getDigest()` is required; otherwise throw.\n- Implement upload as distribution-spec two-step: `POST /blobs/uploads/` (no body) -\u003e `PUT \u003clocation\u003e?digest=...` (single streamed body).\n- Use `BodyPublishers.ofInputStream(stream)` so auth/redirect retries can reopen the stream (no temp files).\n\nCopy usage:\n- Update `src/main/java/land/oras/CopyUtils.java` to call the new overload and pass known `layer.getSize()` + a stream supplier.\n\nNon-goals:\n- Streaming when digest is not known (no \"compute digest while uploading\" in this change).\n- Changing existing `pushBlob(Path|byte[])` behavior.\n\n### Why is this needed for ORAS?\n\n- Performance: avoid extra disk I/O and temp space for every copied blob.\n- Resource limits: works in constrained environments (CI runners, k8s, serverless).\n\n### Are you willing to submit PRs to contribute to this feature?\n\n- [x] Yes, I am willing to implement it.","author":{"url":"https://github.com/h2cone","@type":"Person","name":"h2cone"},"datePublished":"2026-01-26T08:16:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/508/oras-java/issues/508"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:980d9225-3ba1-9fcc-6c1e-ef76e49f018c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 992E:2EA89:1987769:20CBC33:697E1164 |
| html-safe-nonce | 842f424fd419c981878a4f20d6fe8bfeb3456842c7d3f8dae19b6b00cdcf7c99 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTJFOjJFQTg5OjE5ODc3Njk6MjBDQkMzMzo2OTdFMTE2NCIsInZpc2l0b3JfaWQiOiI1MTQ1MTQxMjMwNjA2MDk0NjkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2cddc7de0937c09efb3bee75eb1c71bc2ab54b3cd07fbe8f7bcda34c321deab1 |
| hovercard-subject-tag | issue:3854935478 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/oras-project/oras-java/508/issue_layout |
| twitter:image | https://opengraph.githubassets.com/32368119a7f36625e7959407b06e47b15c6ec289eb18287fa9362f8e9a9b0161/oras-project/oras-java/issues/508 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/32368119a7f36625e7959407b06e47b15c6ec289eb18287fa9362f8e9a9b0161/oras-project/oras-java/issues/508 |
| og:image:alt | What would you like to be added? Current OCI.pushBlob(ref, InputStream) spools to a temp file first (src/main/java/land/oras/OCI.java:109). Add a streaming upload overload for the remote registry p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | h2cone |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/oras-project/oras-java git https://github.com/oras-project/oras-java.git |
| octolytics-dimension-user_id | 81890686 |
| octolytics-dimension-user_login | oras-project |
| octolytics-dimension-repository_id | 857379476 |
| octolytics-dimension-repository_nwo | oras-project/oras-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 857379476 |
| octolytics-dimension-repository_network_root_nwo | oras-project/oras-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width