MCPcopy Create free account
hub / github.com/dropbox/dbxcli / uploadProgressReader

Function uploadProgressReader

cmd/put.go:78–90  ·  view source on GitHub ↗
(r io.Reader, size int64, errOut io.Writer)

Source from the content-addressed store, hash-verified

76}
77
78func uploadProgressReader(r io.Reader, size int64, errOut io.Writer) *ioprogress.Reader {
79 if errOut == nil {
80 errOut = os.Stderr
81 }
82 return &ioprogress.Reader{
83 Reader: r,
84 DrawFunc: ioprogress.DrawTerminalf(errOut, func(progress, total int64) string {
85 return fmt.Sprintf("Uploading %s/%s",
86 humanize.IBytes(uint64(progress)), humanize.IBytes(uint64(total)))
87 }),
88 Size: size,
89 }
90}
91
92func uploadSingleShot(dbx filesClient, r io.ReadSeeker, uploadArg *files.UploadArg, size int64, errOut io.Writer) (*files.FileMetadata, error) {
93 var metadata *files.FileMetadata

Callers 2

uploadSingleShotFunction · 0.85
putFileWithResultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected