Are there any differences in how they function ? Which package is used in which scenario ?
I am developing a Spring MVC application and want to upload files (>100 MB) directly to Cloud Storage and download them without any errors and without going through App Engine instances. Which one suits me best ?
Hello Abhiram,
Com.google.cloud.storage is a client for Cloud Storage and helps to upload files into the buckets.
com.google.appengine.tools.cloudstorage is part of the com.google.appengine.tools package that make up the Google App Engine Tools API, which can be embedded in IDEs and other development utilities to perform testing and deployment of App Engine applications [1].
Com.google.cloud.storage is used for uploading documents into the Cloud Storage buckets. On the other hand as described earlier com.google.appengine.tools.cloudstorage is not meant to be used by the typical user.
To upload your documents without passing through your application you can use the signUrl method of the Blob class of the com.google.cloud.storage package [2]. Signed URLs, which is a mechanism for query string authentication for buckets and objects [3]. Signed URLs provide a way to give time-limited read or write access to anyone in possession of the URL, regardless of whether they have a Google account. Files can be uploaded or downloaded directly from buckets of Cloud Storage without going through any App Engine instances.
[3] https://cloud.google.com/storage/docs/access-control/signed-urls