feat:add a uuid after uploadid (#3963)
This commit is contained in:
@@ -284,8 +284,9 @@ func (s3a *S3ApiServer) generateUploadID(object string) string {
|
||||
// Check object name and uploadID when processing multipart uploading
|
||||
func (s3a *S3ApiServer) checkUploadId(object string, id string) error {
|
||||
|
||||
hash := s3a.generateUploadID(object)
|
||||
if hash != id {
|
||||
hash := s3a.generateUploadID(strings.Split(object, "_")[0])
|
||||
|
||||
if !strings.HasPrefix(id, hash) {
|
||||
glog.Errorf("object %s and uploadID %s are not matched", object, id)
|
||||
return fmt.Errorf("object %s and uploadID %s are not matched", object, id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user