Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build-&-publish-docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Build & Publish Docker Image"
name: "Dockerize"

concurrency:
group: "publish-${{ github.ref }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
linter:
name: Buf & Golangci lint
name: Lints
runs-on: [self-hosted,docker-builds]
steps:
- name: Setup go 1.17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (cc *AllocationChangeCollector) ComputeProperties() {
var acp AllocationChangeProcessor
switch change.Operation {
case constants.FileOperationInsert:
acp = new(NewFileChange)
acp = new(AddFileChanger)
case constants.FileOperationUpdate:
acp = new(UpdateFileChanger)
case constants.FileOperationDelete:
Expand All @@ -130,7 +130,6 @@ func (cc *AllocationChangeCollector) ComputeProperties() {
acp = new(CopyFileChange)
case constants.FileOperationUpdateAttrs:
acp = new(AttributesChange)

}

if acp == nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type BaseFileChanger struct {
ActualThumbnailSize int64 `json:"actual_thumb_size"`
//client side:
ActualThumbnailHash string `json:"actual_thumb_hash"`

//client side:
MimeType string `json:"mimetype,omitempty"`
//client side:
Expand Down
4 changes: 4 additions & 0 deletions code/go/0chain.net/blobbercore/handler/file_command_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ func (cmd *AddFileCommand) reloadChange(connectionObj *allocation.AllocationChan
}

cmd.fileChanger.Size = dbChangeProcessor.Size
cmd.fileChanger.ThumbnailFilename = dbChangeProcessor.ThumbnailFilename
cmd.fileChanger.ThumbnailSize = dbChangeProcessor.ThumbnailSize
cmd.fileChanger.ThumbnailHash = dbChangeProcessor.Hash

return
}
}
Expand Down
135 changes: 0 additions & 135 deletions code/go/0chain.net/blobbercore/handler/file_command_insert.go

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (cmd *UpdateFileCommand) reloadChange(connectionObj *allocation.AllocationC
for _, c := range connectionObj.Changes {
if c.Operation == constants.FileOperationUpdate {

dbFileChanger := &allocation.AddFileChanger{}
dbFileChanger := &allocation.UpdateFileChanger{}

err := dbFileChanger.Unmarshal(c.Input)
if err != nil {
Expand All @@ -167,6 +167,9 @@ func (cmd *UpdateFileCommand) reloadChange(connectionObj *allocation.AllocationC

// reload uploaded size from db, it was chunk size from client
cmd.fileChanger.Size = dbFileChanger.Size
cmd.fileChanger.ThumbnailFilename = dbFileChanger.ThumbnailFilename
cmd.fileChanger.ThumbnailSize = dbFileChanger.ThumbnailSize
cmd.fileChanger.ThumbnailHash = dbFileChanger.Hash
return
}
}
Expand Down