Skip to content
Snippets Groups Projects
Commit e14e73d0 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Uploads: Implement range for google storage read

parent 69a76ceb
No related branches found
No related tags found
No related merge requests found
......@@ -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);
};
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment