MCPcopy
hub / github.com/minio/minio-go / findUploadIDs

Method findUploadIDs

api-list.go:1068–1083  ·  view source on GitHub ↗

findUploadIDs lists all incomplete uploads and find the uploadIDs of the matching object name.

(ctx context.Context, bucketName, objectName string)

Source from the content-addressed store, hash-verified

1066
1067// findUploadIDs lists all incomplete uploads and find the uploadIDs of the matching object name.
1068func (c *Client) findUploadIDs(ctx context.Context, bucketName, objectName string) ([]string, error) {
1069 var uploadIDs []string
1070 // Make list incomplete uploads recursive.
1071 isRecursive := true
1072 // List all incomplete uploads.
1073 for mpUpload := range c.listIncompleteUploads(ctx, bucketName, objectName, isRecursive) {
1074 if mpUpload.Err != nil {
1075 return nil, mpUpload.Err
1076 }
1077 if objectName == mpUpload.Key {
1078 uploadIDs = append(uploadIDs, mpUpload.UploadID)
1079 }
1080 }
1081 // Return the latest upload id.
1082 return uploadIDs, nil
1083}
1084
1085// listObjectPartsQuery (List Parts query)
1086// - lists some or all (up to 1000) parts that have been uploaded

Callers 1

Calls 1

listIncompleteUploadsMethod · 0.95

Tested by

no test coverage detected