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

Function CheckValidObjectNamePrefix

pkg/s3utils/utils.go:461–469  ·  view source on GitHub ↗

CheckValidObjectNamePrefix - checks if we have a valid input object name prefix. - http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html

(objectName string)

Source from the content-addressed store, hash-verified

459// CheckValidObjectNamePrefix - checks if we have a valid input object name prefix.
460// - http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
461func CheckValidObjectNamePrefix(objectName string) error {
462 if len(objectName) > 1024 {
463 return errors.New("Object name cannot be longer than 1024 characters")
464 }
465 if !utf8.ValidString(objectName) {
466 return errors.New("Object name with non UTF-8 strings are not supported")
467 }
468 return nil
469}
470
471// CheckValidObjectName - checks if we have a valid input object name.
472// - http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html

Callers 8

listObjectsV2Method · 0.92
listObjectsV2QueryMethod · 0.92
listObjectsMethod · 0.92
listObjectVersionsMethod · 0.92
listObjectsQueryMethod · 0.92
listIncompleteUploadsMethod · 0.92
CheckValidObjectNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected