Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify/fmt leaf hash calculation #912

Merged
merged 80 commits into from
Mar 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
be6c727
WIP Add tree skeleton
lpoli Dec 31, 2022
3e4c579
Add functions further
lpoli Jan 1, 2023
72c583a
Define constant
lpoli Jan 1, 2023
5e69d55
Add separate struct for merkle proof
lpoli Jan 3, 2023
99ecb1b
Remove duplicate constant
lpoli Jan 4, 2023
d344221
Remove redundant lines.
lpoli Jan 5, 2023
a342040
Add unit test
lpoli Jan 5, 2023
584bb65
Add unit test for merkle proof generation
lpoli Jan 6, 2023
a0d0009
Update minor fixes
lpoli Jan 6, 2023
a906816
Optimze writes and fix issues
lpoli Jan 9, 2023
cb53038
Add unit test
lpoli Jan 9, 2023
ced9dd4
Add comments
lpoli Jan 9, 2023
456a606
Add methods
lpoli Jan 10, 2023
e67ee89
Modify for merkle tree changes
lpoli Jan 10, 2023
c9f684f
Add and fix return value
lpoli Jan 11, 2023
a6c7c25
Seek to negative filesize
lpoli Jan 11, 2023
0734de2
Fix tests
lpoli Jan 11, 2023
f855eee
Replace content hash with validation root
lpoli Jan 11, 2023
7a43d59
Remove file info in writemarker
lpoli Jan 11, 2023
a905fb8
Remove redundant variable initialization
lpoli Jan 11, 2023
88c510b
Upgrade gosdk to specific commit
lpoli Jan 11, 2023
ef929bb
Add leaf index in response and modify json tag
lpoli Jan 12, 2023
082e5d6
Modify validatior according to recent blobber changes
lpoli Jan 12, 2023
2b8b3e1
Fix unit test
lpoli Jan 12, 2023
10e27e5
Add test to cover for size lesser than 64 KB
lpoli Jan 12, 2023
1ace016
Add signatures of file to ref
lpoli Jan 13, 2023
b5c1c29
Change block-num condition
lpoli Jan 13, 2023
aae91ea
Merge branch 'staging' into modify/fmt-leaf-hash-calculation
lpoli Jan 14, 2023
2025b68
Add fields and optimize update function
lpoli Jan 17, 2023
3aebd8d
Update thumbnail hash as sent by the client
lpoli Jan 17, 2023
9ffb384
Update minimum block num to be zero
lpoli Jan 17, 2023
6432876
Add bool field
lpoli Jan 17, 2023
93a31ff
Segragate getting thumbnail file function
lpoli Jan 17, 2023
a456fc4
Remove redundant equality condition
lpoli Jan 17, 2023
5d9539f
Update gosdk
lpoli Jan 17, 2023
17f13ff
Fix size requirement for single leaf
lpoli Jan 17, 2023
cabc428
Fix tests
lpoli Jan 17, 2023
1b9894c
Fix type
lpoli Jan 17, 2023
db4f984
Revert type to string
lpoli Jan 17, 2023
1e4b4e2
Make file executable
lpoli Jan 17, 2023
a3ca255
Fix endblock issue
lpoli Jan 19, 2023
9a00804
Get file hash from path
lpoli Jan 19, 2023
b9e52b8
Merge branch 'staging' into modify/fmt-leaf-hash-calculation
lpoli Jan 30, 2023
b793821
Add bench test for fixed merkle proof generation
lpoli Jan 30, 2023
bf8355c
Merge branch 'staging' into modify/fmt-leaf-hash-calculation
lpoli Feb 2, 2023
20ebfd6
Upgrade with go mod tidy
lpoli Feb 6, 2023
16c4a97
Fix variable naming for readability
lpoli Feb 6, 2023
d83a578
Add/Update comments
lpoli Feb 6, 2023
12ec3ee
Update error message and ineffectual assignment
lpoli Feb 6, 2023
3ee39b5
Merge defer
lpoli Feb 10, 2023
7a586c4
Fix end index issue
lpoli Feb 11, 2023
b478b8d
Upgrade gosdk to specific commit
lpoli Feb 11, 2023
35f2c29
Merge branch 'staging' into modify/fmt-leaf-hash-calculation
lpoli Feb 11, 2023
e7d074b
Merge branch 'staging' into modify/fmt-leaf-hash-calculation
lpoli Feb 15, 2023
59bbbdd
fix logging
Kishan-Dhakan Feb 15, 2023
897beaa
Merge branch 'staging' into modify/fmt-leaf-hash-calculation
lpoli Feb 19, 2023
1a5b7e7
Upgrage gosdk to specific commit
lpoli Feb 19, 2023
13d7945
Update lock application
lpoli Feb 19, 2023
0a5ba1c
Improve readability
lpoli Feb 19, 2023
c2890a3
Merge branch 'staging' into modify/fmt-leaf-hash-calculation
lpoli Feb 20, 2023
8ebbc60
Add option to generate validation merkle proof
lpoli Feb 21, 2023
88623e4
Slice out nil validation ticket
lpoli Feb 21, 2023
b27b466
Upgrade gosdk to specific commit
lpoli Feb 24, 2023
7c3cb20
Add proof generation time consumption
lpoli Mar 2, 2023
f510ff9
Merge branch 'staging' into add/proof-gen-time
lpoli Mar 2, 2023
adeb122
Merge branch 'staging' into modify/fmt-leaf-hash-calculation
lpoli Mar 3, 2023
af7d026
Fix validatorcore unit tests
lpoli Mar 3, 2023
bb365c4
Merge branch 'staging' into modify/fmt-leaf-hash-calculation
lpoli Mar 3, 2023
f00d2b5
Merge branch 'staging' into add/proof-gen-time
lpoli Mar 3, 2023
18b5f8b
Add log
lpoli Mar 3, 2023
b6ec9d9
Merge branch 'add/proof-gen-time' into modify/fmt-leaf-hash-calculation
lpoli Mar 4, 2023
f6c650a
Fix lint issue
lpoli Mar 4, 2023
f93c55b
Fix missing unlock of a lock
lpoli Mar 5, 2023
b952225
Merge branch 'staging' into modify/fmt-leaf-hash-calculation
lpoli Mar 6, 2023
a4266b1
Merge branch 'staging' into add/proof-gen-time
lpoli Mar 6, 2023
896d612
Store proof gen time as milliseconds
lpoli Mar 6, 2023
1d75e9b
Merge branch 'add/proof-gen-time' into modify/fmt-leaf-hash-calculation
lpoli Mar 6, 2023
644ddcc
Merge branch 'staging' into modify/fmt-leaf-hash-calculation
lpoli Mar 7, 2023
0cd1ef7
Merge branch 'staging' into modify/fmt-leaf-hash-calculation
lpoli Mar 8, 2023
aa4e64d
Merge branch 'staging' into modify/fmt-leaf-hash-calculation
lpoli Mar 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions code/go/0chain.net/blobbercore/allocation/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ package allocation

import (
"bytes"
"encoding/json"
"io"
"mime/multipart"

"github.com/0chain/blobber/code/go/0chain.net/blobbercore/filestore"
"github.com/0chain/gosdk/core/util"
)

type MockFileStore struct {
Expand All @@ -23,11 +21,11 @@ func (mfs *MockFileStore) WriteFile(allocID, connID string,
b := bytes.NewBuffer(make([]byte, 0))
n, _ := io.Copy(b, infile)
return &filestore.FileOutputData{
Name: fileData.Name,
Path: fileData.Path,
MerkleRoot: "",
ContentHash: fileData.Hash,
Size: n,
Name: fileData.Name,
Path: fileData.Path,
FixedMerkleRoot: "",
ValidationRoot: fileData.ValidationRoot,
Size: n,
}, nil
}

Expand All @@ -43,12 +41,12 @@ func (mfs *MockFileStore) DeleteFile(allocID string, contentHash string) error {
return nil
}

func (mfs *MockFileStore) GetFileBlock(allocID string, fileData *filestore.FileInputData, blockNum int64, numBlocks int64) ([]byte, error) {
func (mfs *MockFileStore) GetFileBlock(rin *filestore.ReadBlockInput) (*filestore.FileDownloadResponse, error) {
return nil, nil
}

func (mfs *MockFileStore) GetBlocksMerkleTreeForChallenge(allocID string, fileData *filestore.FileInputData, blockoffset int) (json.RawMessage, util.MerkleTreeI, error) {
return nil, nil, nil
func (mfs *MockFileStore) GetBlocksMerkleTreeForChallenge(cir *filestore.ChallengeReadBlockInput) (*filestore.ChallengeResponse, error) {
return nil, nil
}

func (mfs *MockFileStore) GetTotalTempFileSizes() (s uint64) {
Expand Down
6 changes: 4 additions & 2 deletions code/go/0chain.net/blobbercore/allocation/copyfilechange.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ func (rf *CopyFileChange) ApplyChange(ctx context.Context, change *AllocationCha

func (rf *CopyFileChange) processCopyRefs(
ctx context.Context, srcRef, destRef *reference.Ref,
allocationRoot string, ts common.Timestamp, fileIDMeta map[string]string) (
fileRefs []*reference.Ref, err error) {
allocationRoot string, ts common.Timestamp, fileIDMeta map[string]string,
) (
fileRefs []*reference.Ref, err error,
) {

newRef := *srcRef
newRef.ID = 0
Expand Down
106 changes: 53 additions & 53 deletions code/go/0chain.net/blobbercore/allocation/copyfilechange_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,70 +71,70 @@ func TestBlobberCore_CopyFile(t *testing.T) {
mocket.Catcher.NewMock().WithQuery(query).WithReply(
[]map[string]interface{}{
{
"id": 1,
"level": 0,
"lookup_hash": "lookup_hash_root",
"path": "/",
"name": "/",
"allocation_id": alloc.ID,
"parent_path": "",
"content_hash": "",
"thumbnail_size": 00,
"thumbnail_hash": "",
"type": reference.DIRECTORY,
"created_at": common.Now() - 3600,
"updated_at": common.Now() - 1800,
"id": 1,
"level": 0,
"lookup_hash": "lookup_hash_root",
"path": "/",
"name": "/",
"allocation_id": alloc.ID,
"parent_path": "",
"validation_root": "",
"thumbnail_size": 00,
"thumbnail_hash": "",
"type": reference.DIRECTORY,
"created_at": common.Now() - 3600,
"updated_at": common.Now() - 1800,
},
{
"id": 2,
"level": 1,
"lookup_hash": "lookup_hash",
"path": "/orig.txt",
"name": "orig.txt",
"allocation_id": alloc.ID,
"parent_path": "/",
"content_hash": "content_hash",
"thumbnail_size": 00,
"thumbnail_hash": "",
"type": reference.FILE,
"created_at": common.Now() - 3600,
"updated_at": common.Now() - 1800,
"id": 2,
"level": 1,
"lookup_hash": "lookup_hash",
"path": "/orig.txt",
"name": "orig.txt",
"allocation_id": alloc.ID,
"parent_path": "/",
"validation_root": "validation_root",
"thumbnail_size": 00,
"thumbnail_hash": "",
"type": reference.FILE,
"created_at": common.Now() - 3600,
"updated_at": common.Now() - 1800,
},
},
)

q2 := `SELECT "id","allocation_id","type","name","path","parent_path","size","hash","file_meta_hash","path_hash","content_hash","merkle_root","actual_file_size","actual_file_hash","chunk_size","lookup_hash","thumbnail_hash","allocation_root","level","created_at","updated_at" FROM "reference_objects" WHERE ((allocation_id=$1 AND parent_path=$2) OR (parent_path = $3 AND allocation_id = $4)) AND "reference_objects"."deleted_at" IS NULL ORDER BY path`
q2 := `SELECT "id","allocation_id","type","name","path","parent_path","size","hash","file_meta_hash","path_hash","validation_root","fixed_merkle_root","actual_file_size","actual_file_hash","chunk_size","lookup_hash","thumbnail_hash","allocation_root","level","created_at","updated_at" FROM "reference_objects" WHERE ((allocation_id=$1 AND parent_path=$2) OR (parent_path = $3 AND allocation_id = $4)) AND "reference_objects"."deleted_at" IS NULL ORDER BY path`
mocket.Catcher.NewMock().WithQuery(q2).WithReply(
[]map[string]interface{}{
{
"id": 1,
"level": 1,
"lookup_hash": "lookup_hash_root",
"path": "/",
"name": "/",
"allocation_id": alloc.ID,
"parent_path": "",
"content_hash": "",
"thumbnail_size": 00,
"thumbnail_hash": "",
"type": reference.DIRECTORY,
"created_at": common.Now() - 3600,
"updated_at": common.Now() - 1800,
"id": 1,
"level": 1,
"lookup_hash": "lookup_hash_root",
"path": "/",
"name": "/",
"allocation_id": alloc.ID,
"parent_path": "",
"validation_root": "",
"thumbnail_size": 00,
"thumbnail_hash": "",
"type": reference.DIRECTORY,
"created_at": common.Now() - 3600,
"updated_at": common.Now() - 1800,
},
{
"id": 2,
"level": 2,
"lookup_hash": "lookup_hash",
"path": "/orig.txt",
"name": "orig.txt",
"allocation_id": alloc.ID,
"parent_path": "/",
"content_hash": "content_hash",
"thumbnail_size": 00,
"thumbnail_hash": "",
"type": reference.FILE,
"created_at": common.Now() - 3600,
"updated_at": common.Now() - 1800,
"id": 2,
"level": 2,
"lookup_hash": "lookup_hash",
"path": "/orig.txt",
"name": "orig.txt",
"allocation_id": alloc.ID,
"parent_path": "/",
"validation_root": "validation_root",
"thumbnail_size": 00,
"thumbnail_hash": "",
"type": reference.FILE,
"created_at": common.Now() - 3600,
"updated_at": common.Now() - 1800,
},
},
)
Expand Down
14 changes: 7 additions & 7 deletions code/go/0chain.net/blobbercore/allocation/deletefilechange.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,24 @@ func (nf *DeleteFileChange) DeleteTempFile() error {
func (nf *DeleteFileChange) CommitToFileStore(ctx context.Context) error {
db := datastore.GetStore().GetTransaction(ctx)
type Result struct {
Id string
ContentHash string
ThumbnailHash string
Id string
ValidationRoot string
ThumbnailHash string
}

limitCh := make(chan struct{}, 10)
wg := &sync.WaitGroup{}
var results []Result
err := db.Model(&reference.Ref{}).Unscoped().
Select("id", "content_hash", "thumbnail_hash").
Select("id", "validation_root", "thumbnail_hash").
Where("allocation_id=? AND path LIKE ? AND type=? AND deleted_at is not NULL",
nf.AllocationID, nf.Path+"%", reference.FILE).
FindInBatches(&results, 100, func(tx *gorm.DB, batch int) error {

for _, res := range results {
var count int64
tx.Model(&reference.Ref{}).
Where("allocation_id=? AND content_hash=?", nf.AllocationID, res.ContentHash).
Where("allocation_id=? AND validation_root=?", nf.AllocationID, res.ValidationRoot).
Count(&count)

db.Model(&reference.CommitMetaTxn{}).Delete("ref_id = ?", res.Id)
Expand All @@ -101,10 +101,10 @@ func (nf *DeleteFileChange) CommitToFileStore(ctx context.Context) error {
}()

if count == 0 {
err := filestore.GetFileStore().DeleteFile(nf.AllocationID, res.ContentHash)
err := filestore.GetFileStore().DeleteFile(nf.AllocationID, res.ValidationRoot)
if err != nil {
logging.Logger.Error(fmt.Sprintf("Error while deleting file: %s", err.Error()),
zap.String("content_hash", res.ContentHash))
zap.String("validation_root", res.ValidationRoot))
}
}

Expand Down
20 changes: 12 additions & 8 deletions code/go/0chain.net/blobbercore/allocation/file_changer_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ type BaseFileChanger struct {
//client side:
Path string `json:"filepath" validation:"required"`
//client side:
ActualFileHashSignature string `json:"actual_file_hash_signature,omitempty" validation:"required"`
//client side:
ActualHash string `json:"actual_hash,omitempty" validation:"required"`
//client side:
ActualSize int64 `json:"actual_size,omitempty" validation:"required"`
Expand All @@ -29,13 +31,15 @@ type BaseFileChanger struct {
MimeType string `json:"mimetype,omitempty"`
//client side:
//client side:
MerkleRoot string `json:"merkle_root,omitempty"`
FixedMerkleRoot string `json:"fixed_merkle_root,omitempty"`

//server side: update them by ChangeProcessor
AllocationID string `json:"allocation_id"`
//client side:
Hash string `json:"content_hash,omitempty"`
Size int64 `json:"size"`
ValidationRootSignature string `json:"validation_root_signature,omitempty"`
//client side:
ValidationRoot string `json:"validation_root,omitempty"`
Size int64 `json:"size"`
//server side:
ThumbnailHash string `json:"thumbnail_content_hash,omitempty"`
ThumbnailSize int64 `json:"thumbnail_size"`
Expand All @@ -57,13 +61,13 @@ func (fc *BaseFileChanger) DeleteTempFile() error {
fileInputData := &filestore.FileInputData{}
fileInputData.Name = fc.Filename
fileInputData.Path = fc.Path
fileInputData.Hash = fc.Hash
fileInputData.ValidationRoot = fc.ValidationRoot
err := filestore.GetFileStore().DeleteTempFile(fc.AllocationID, fc.ConnectionID, fileInputData)
if fc.ThumbnailSize > 0 {
fileInputData := &filestore.FileInputData{}
fileInputData.Name = fc.ThumbnailFilename
fileInputData.Path = fc.Path
fileInputData.Hash = fc.ThumbnailHash
fileInputData.ThumbnailHash = fc.ThumbnailHash
err = filestore.GetFileStore().DeleteTempFile(fc.AllocationID, fc.ConnectionID, fileInputData)
}
return err
Expand All @@ -73,8 +77,8 @@ func (fc *BaseFileChanger) CommitToFileStore(ctx context.Context) error {
fileInputData := &filestore.FileInputData{}
fileInputData.Name = fc.Filename
fileInputData.Path = fc.Path
fileInputData.Hash = fc.Hash
fileInputData.MerkleRoot = fc.MerkleRoot
fileInputData.ValidationRoot = fc.ValidationRoot
fileInputData.FixedMerkleRoot = fc.FixedMerkleRoot
fileInputData.ChunkSize = fc.ChunkSize
_, err := filestore.GetFileStore().CommitWrite(fc.AllocationID, fc.ConnectionID, fileInputData)
if err != nil {
Expand All @@ -84,7 +88,7 @@ func (fc *BaseFileChanger) CommitToFileStore(ctx context.Context) error {
fileInputData := &filestore.FileInputData{}
fileInputData.Name = fc.ThumbnailFilename
fileInputData.Path = fc.Path
fileInputData.Hash = fc.ThumbnailHash
fileInputData.ThumbnailHash = fc.ThumbnailHash
fileInputData.ChunkSize = fc.ChunkSize
fileInputData.IsThumbnail = true
_, err := filestore.GetFileStore().CommitWrite(fc.AllocationID, fc.ConnectionID, fileInputData)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,17 @@ func (nf *UpdateFileChanger) ApplyChange(ctx context.Context, change *Allocation
if fileRef.ThumbnailHash != "" && fileRef.ThumbnailHash != nf.ThumbnailHash {
nf.deleteHash[fileRef.ThumbnailHash] = true
}
if fileRef.ContentHash != "" && fileRef.ContentHash != nf.Hash {
nf.deleteHash[fileRef.ContentHash] = true
if fileRef.ValidationRoot != "" && fileRef.ValidationRoot != nf.ValidationRoot {
nf.deleteHash[fileRef.ValidationRoot] = true
}
fileRef.ActualFileHash = nf.ActualHash
fileRef.ActualFileHashSignature = nf.ActualFileHashSignature
fileRef.ActualFileSize = nf.ActualSize
fileRef.MimeType = nf.MimeType
fileRef.ContentHash = nf.Hash
fileRef.ValidationRootSignature = nf.ValidationRootSignature
fileRef.ValidationRoot = nf.ValidationRoot
fileRef.CustomMeta = nf.CustomMeta
fileRef.MerkleRoot = nf.MerkleRoot
fileRef.FixedMerkleRoot = nf.FixedMerkleRoot
fileRef.AllocationRoot = allocationRoot
fileRef.Size = nf.Size
fileRef.ThumbnailHash = nf.ThumbnailHash
Expand All @@ -108,18 +110,18 @@ func (nf *UpdateFileChanger) ApplyChange(ctx context.Context, change *Allocation

func (nf *UpdateFileChanger) CommitToFileStore(ctx context.Context) error {
db := datastore.GetStore().GetTransaction(ctx)
for contenthash := range nf.deleteHash {
for hash := range nf.deleteHash {
var count int64
err := db.Table((&reference.Ref{}).TableName()).
Where(
db.Where(&reference.Ref{ThumbnailHash: contenthash}).
Or(&reference.Ref{ContentHash: contenthash})).
db.Where(&reference.Ref{ThumbnailHash: hash}).
Or(&reference.Ref{ValidationRoot: hash})).
Where(&reference.Ref{AllocationID: nf.AllocationID}).
Count(&count).Error

if err == nil && count == 0 {
logging.Logger.Info("Deleting content file", zap.String("content_hash", contenthash))
if err := filestore.GetFileStore().DeleteFile(nf.AllocationID, contenthash); err != nil {
logging.Logger.Info("Deleting content file", zap.String("validation_root", hash))
if err := filestore.GetFileStore().DeleteFile(nf.AllocationID, hash); err != nil {
logging.Logger.Error("FileStore_DeleteFile", zap.String("allocation_id", nf.AllocationID), zap.Error(err))
}
}
Expand Down
46 changes: 24 additions & 22 deletions code/go/0chain.net/blobbercore/allocation/file_changer_upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,28 +84,30 @@ func (nf *UploadFileChanger) ApplyChange(ctx context.Context, change *Allocation
}

newFile := &reference.Ref{
ActualFileHash: nf.ActualHash,
ActualFileSize: nf.ActualSize,
AllocationID: dirRef.AllocationID,
ContentHash: nf.Hash,
CustomMeta: nf.CustomMeta,
MerkleRoot: nf.MerkleRoot,
Name: nf.Filename,
Path: nf.Path,
ParentPath: dirRef.Path,
Type: reference.FILE,
Size: nf.Size,
MimeType: nf.MimeType,
AllocationRoot: allocationRoot,
ThumbnailHash: nf.ThumbnailHash,
ThumbnailSize: nf.ThumbnailSize,
ActualThumbnailHash: nf.ActualThumbnailHash,
ActualThumbnailSize: nf.ActualThumbnailSize,
EncryptedKey: nf.EncryptedKey,
ChunkSize: nf.ChunkSize,
CreatedAt: ts,
UpdatedAt: ts,
HashToBeComputed: true,
ActualFileHash: nf.ActualHash,
ActualFileHashSignature: nf.ActualFileHashSignature,
ActualFileSize: nf.ActualSize,
AllocationID: dirRef.AllocationID,
ValidationRoot: nf.ValidationRoot,
ValidationRootSignature: nf.ValidationRootSignature,
CustomMeta: nf.CustomMeta,
FixedMerkleRoot: nf.FixedMerkleRoot,
Name: nf.Filename,
Path: nf.Path,
ParentPath: dirRef.Path,
Type: reference.FILE,
Size: nf.Size,
MimeType: nf.MimeType,
AllocationRoot: allocationRoot,
ThumbnailHash: nf.ThumbnailHash,
ThumbnailSize: nf.ThumbnailSize,
ActualThumbnailHash: nf.ActualThumbnailHash,
ActualThumbnailSize: nf.ActualThumbnailSize,
EncryptedKey: nf.EncryptedKey,
ChunkSize: nf.ChunkSize,
CreatedAt: ts,
UpdatedAt: ts,
HashToBeComputed: true,
}

fileID, ok := fileIDMeta[newFile.Path]
Expand Down
Loading