IsValidObjectName verifies an object name in accordance with Amazon's requirements. It cannot exceed 1024 characters and must be a valid UTF8 string. See: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html You should avoid the following characters in a key name because of significan
(object string)
| 149 | // |
| 150 | // additionally minio does not support object names with trailing SlashSeparator. |
| 151 | func IsValidObjectName(object string) bool { |
| 152 | if len(object) == 0 { |
| 153 | return false |
| 154 | } |
| 155 | if HasSuffix(object, SlashSeparator) { |
| 156 | return false |
| 157 | } |
| 158 | return IsValidObjectPrefix(object) |
| 159 | } |
| 160 | |
| 161 | // IsValidObjectPrefix verifies whether the prefix is a valid object name. |
| 162 | // Its valid to have a empty prefix. |