file size support set file length

use Attr.FileSize and TotalChunkSize to determine file size
This commit is contained in:
Chris Lu
2020-08-15 09:32:47 -07:00
parent c03bb180eb
commit c647deace1
16 changed files with 73 additions and 39 deletions

View File

@@ -89,7 +89,7 @@ func (g *GcsSink) CreateEntry(key string, entry *filer_pb.Entry) error {
return nil
}
totalSize := filer2.TotalSize(entry.Chunks)
totalSize := filer2.FileSize(entry)
chunkViews := filer2.ViewFromChunks(g.filerSource.LookupFileId, entry.Chunks, 0, int64(totalSize))
wc := g.client.Bucket(g.bucket).Object(key).NewWriter(context.Background())