Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chunk upload #13

Open
Tracked by #11
jonesbusy opened this issue Oct 4, 2024 · 1 comment
Open
Tracked by #11

Chunk upload #13

jonesbusy opened this issue Oct 4, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@jonesbusy
Copy link
Collaborator

Right now only POST and POST/PUT are implemented

Support for chunks upload

https://github.com/opencontainers/distribution-spec/blob/main/spec.md#pushing-a-blob-in-chunks

@jonesbusy jonesbusy mentioned this issue Oct 4, 2024
29 tasks
@jonesbusy jonesbusy added the enhancement New feature or request label Oct 4, 2024
@jonesbusy jonesbusy added this to the 1.0.0 milestone Oct 4, 2024
@jonesbusy
Copy link
Collaborator Author

Righ now using monolitic approach

    public Layer pushBlobStream(ContainerRef containerRef, InputStream input, long size) {
        try {
            // TODO: Replace by chunk upload
            Path tempFile = Files.createTempFile("oras", "layer");
            Files.copy(input, tempFile, StandardCopyOption.REPLACE_EXISTING);
            return pushBlob(containerRef, tempFile);
        } catch (IOException e) {
            throw new OrasException("Failed to push blob", e);
        }
    }

Stream need to be send by chunks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant