Skip to content

Commit 078a431

Browse files
committed
Improve docs
1 parent 9c1be94 commit 078a431

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

upload.go

+20-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,26 @@ const (
1414
OffsetUnknown = -1
1515
)
1616

17+
// Upload represents an upload on the server.
1718
type Upload struct {
18-
Location string
19-
RemoteSize int64
20-
RemoteOffset int64
21-
Metadata map[string]string
19+
// Location is the upload location. Can be either a path or URL
20+
Location string
21+
22+
// RemoteSize is the remote upload size in bytes. Value SizeUnknown here means that the upload was created with
23+
// deferred size and must be determined before the first data transfer.
24+
RemoteSize int64
25+
26+
// RemoteOffset reflects the offset of remote upload. This field is continuously updated by UploadStream
27+
// while transferring the data.
28+
RemoteOffset int64
29+
30+
// Metadata is additional data assigned to the upload, when it was created on the server.
31+
Metadata map[string]string
32+
33+
// UploadExpired represents the time when an upload expire on the server and won't be available since then. Nil
34+
// value means that upload will not be expired.
2235
UploadExpired *time.Time
23-
Partial bool
36+
37+
// Partial true value denotes that the upload is "partial" and meant to be concatenated into a "final" upload further.
38+
Partial bool
2439
}

0 commit comments

Comments
 (0)