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

feat: add upload from file to storage backend #537

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jeqo
Copy link
Contributor

@jeqo jeqo commented Apr 9, 2024

Backend SDKs may have optimized ways to upload directly from files, instead of loading to memory as part of the plugin.

This PR only covers the additional API, but the usage on RSM will be implemented in a following PR.

@jeqo jeqo marked this pull request as ready for review April 9, 2024 08:45
@jeqo jeqo requested a review from a team as a code owner April 9, 2024 08:45

public interface ObjectUploader {
/**
* @param inputStream content to upload. Not closed as part of the upload.
* @param key path to an object within a storage backend.
* @param key destintion path to an object within a storage backend.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param key destintion path to an object within a storage backend.
* @param key destination path to an object within a storage backend.

* @param size size of the object to upload
* @param key destination path to an object within a storage backend
*/
default long upload(Path path, int size, ObjectKey key) throws StorageBackendException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this upload call used ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be in a following PR (updated the PR description to make this clear), it touches RemoteStorageManager logic that is being refactored in other PRs (e.g. #531)

Backend SDKs may have optimized ways to upload directly from files, instead of loading to memory as part of the plugin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants