0chain / blobber

A storage provider (blobber) interface to the blockchain and consumers of storage.
Other
19 stars 23 forks source link

New move file endpoint #852

Closed Sriep closed 1 year ago

Sriep commented 2 years ago

We need a new move file endpoint that moves a file without charging.

Currently goSDK.zboxcore.sdk.allocation.MoveOject

func (a *Allocation) MoveObject(path string, destPath string) error {
    err := a.CopyObject(path, destPath)
    if err != nil {
        return err
    }
    return a.DeleteFile(path)
}

However, a copy charges, so copy and delete cannot be used instead of the free move action.

Add new handler to blobbercore.

Once we have the new move endpoint we will need to update the goSDK file linked above.

lpoli commented 1 year ago

@guruhubb Please comment on this