Upload File
This guide will help you upload files to a cloud drive.
Requirements
Example
We created the drive and now want to upload files on it.
fsTx, _ := client.NewDriveFileSystemTransaction(
sdk.NewDeadline(time.Hour),
driveAccount.PublicAccount,
newRootHash,
oldRootHash,
[]*sdk.AddAction{
{
FileHash: fileHash,
FileSize: sdk.StorageSize(fileSize),
},
},
[]*sdk.RemoveAction{},
)
fsTx.ToAggregate(owner.PublicAccount)