Currently, the downloader middleware supports reading WACZ files from local storage and Amazon S3. To enhance the flexibility of the middleware, it would be beneficial to add support for reading WACZ files stored in Google Cloud Storage (GCS).
Proposed Changes
Implement a new GCSZipStorageHandler class extending the ZipStorageHandler base class.
Use the Google Cloud Storage API to fetch files and metadata using range requests for optimal performance. Update the ZipStorageHandlerFactory to recognize gs:// URIs and return the GCSZipStorageHandler.
Tasks
Currently, the downloader middleware supports reading WACZ files from local storage and Amazon S3. To enhance the flexibility of the middleware, it would be beneficial to add support for reading WACZ files stored in Google Cloud Storage (GCS).
Proposed Changes
Implement a new
GCSZipStorageHandlerclass extending theZipStorageHandlerbase class.Use the Google Cloud Storage API to fetch files and metadata using range requests for optimal performance. Update the
ZipStorageHandlerFactoryto recognizegs://URIs and return theGCSZipStorageHandler.Tasks
GCSZipStorageHandlerwith methods for fetching files and metadata.ZipStorageHandlerFactoryto handlegs://URIs.GCSFileResolverwith methods for resolving files matching a regex pattern.