GeezerVison is showing github.com — add Storage.upload(Path) · Issue #179 · googleapis/java-storage
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
add Storage.upload(Path) #179Labels api: storageIssues related to the googleapis/java-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design. DescriptionIn addition to Blob.uploadFrom() methods which require a Blob instance to be created first there should be a way to upload a resource to the storage without creating an instance of Blob:
interface Storage {
void upload(BlobInfo blobInfo, Path path, BlobWriteOption... options);
void upload(BlobInfo blobInfo, InputStream content, BlobWriteOption... options);
}
Implementing this feature means extending of public interface. Activityadded priority: p2Moderately-important priority. Fix may not be included in next release. and removed 🚨This issue needs some love. on Mar 18, 2020dmitry-fa commented on Mar 27, 2020 ContributorAuthor More actions Extension the Storage interface is incompatible change. Such a minor feature as adding helper upload methods should not break compatibility. Instead of extending the main interface it's better to introduce a new class like StorageUtilities and put various helpers there. frankyn commented on Apr 1, 2020 How is Storage interface change incompatible change in this case? I still think we should add the method under Storage and not create a separate helper utility. dmitry-fa commented on Apr 1, 2020 ContributorAuthor More actions Interface extension is backward incompatible change. frankyn commented on Apr 1, 2020 We've been adding new methods to the interface for several features outside of this request. Could you clarify what you mean?
If we move forward with the feature added in #214 it will create a fracture in developer experience. We can try to do something else, but I'd prefer Storage.upload() over a separate helper class.
cc: @JesseLovelace @elharo @crwilcox dmitry-fa commented on Apr 1, 2020 ContributorAuthor More actions Extending interface breaks the API and requires a major version update since this API post 1.0.
Adding upload functionality is rather a small feature, it just adds a few helper methods. I don't think it deserves a major version update. The helper class will allow to add small feature like this without breaking the API. frankyn commented on Apr 2, 2020 I agree that this doesn't substantiate a major version bump.
I don't agree that we should do this as a separate utility class. It is a fracture in the experience.
What is the failure that you're hitting by updating the Storage API surface? elharo commented on Apr 2, 2020 You can't add a method to an interface without breaking the API. frankyn commented on Apr 2, 2020 I misunderstood. damn, we have breaking the API without major version bumps for a couple of years then.
What other alternatives do we have to continue supporting requests in Storage.java? It really changes the way we execute work so I'm a bit confused. elharo commented on Apr 2, 2020 There are at least 3 ways forward:
- Use concrete classes for new functionality.
- Add a new subinterface.
- Increment the major version.
There's a fourth once we drop Java 7 support. Maybe some others I haven't thought of. frankyn commented on Apr 2, 2020 Shared an internal document to help unblock the existing dev path for now. It will hold up other work as well that needs to be released this way. dmitry-fa commented on Apr 9, 2020 ContributorAuthor More actions @frankyn
Shared an internal document
What the document did you share? frankyn commented on Apr 9, 2020 It's an internal document with Googlers right now. I'm sorting it out. I'll follow-up later today. Thanks for your patience @dmitry-fa frankyn commented on Apr 9, 2020 dmitry-fa commented on Jun 16, 2020 ContributorAuthor More actions To move further with this issue:
MetadataMetadataapi: storageIssues related to the googleapis/java-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design. DevelopmentNo branches or pull requestsIssue actions
|