diff --git a/packages/rocketchat-file-upload/ufs/GoogleStorage/server.js b/packages/rocketchat-file-upload/ufs/GoogleStorage/server.js index a6536d0a334..8a764caac73 100644 --- a/packages/rocketchat-file-upload/ufs/GoogleStorage/server.js +++ b/packages/rocketchat-file-upload/ufs/GoogleStorage/server.js @@ -83,9 +83,18 @@ export class GoogleStorageStore extends UploadFS.Store { * @param options * @return {*} */ - this.getReadStream = function(fileId, file/*, options = {}*/) { - // TODO range? - return this.bucket.file(this.getPath(file)).createReadStream(); + this.getReadStream = function(fileId, file, options = {}) { + const config = {}; + + if (options.start != null) { + config.start = options.start; + } + + if (options.end != null) { + config.end = options.end; + } + + return this.bucket.file(this.getPath(file)).createReadStream(config); }; /**