mirror of
				https://github.com/minio/minio.git
				synced 2025-10-29 15:55:00 -04:00 
			
		
		
		
	fix: use readSizeV1 wherever applicable. (#2093)
This commit is contained in:
		
							parent
							
								
									4cfbdb1bf0
								
							
						
					
					
						commit
						0540863663
					
				| @ -27,7 +27,7 @@ import ( | ||||
| ) | ||||
| 
 | ||||
| // maximum supported access policy size. | ||||
| const maxAccessPolicySize = 20 * 1024 * 1024 // 20KiB. | ||||
| const maxAccessPolicySize = 20 * 1024 // 20KiB. | ||||
| 
 | ||||
| // Verify if a given action is valid for the url path based on the | ||||
| // existing bucket access policy. | ||||
|  | ||||
| @ -295,7 +295,7 @@ func (fs fsObjects) PutObjectPart(bucket, object, uploadID string, partID int, s | ||||
| 	md5Writer := md5.New() | ||||
| 
 | ||||
| 	// Allocate 32KiB buffer for staging buffer. | ||||
| 	var buf = make([]byte, 128*1024) | ||||
| 	var buf = make([]byte, readSizeV1) | ||||
| 	for { | ||||
| 		n, err := io.ReadFull(data, buf) | ||||
| 		if err == io.EOF { | ||||
|  | ||||
							
								
								
									
										2
									
								
								fs-v1.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								fs-v1.go
									
									
									
									
									
								
							| @ -323,7 +323,7 @@ func (fs fsObjects) PutObject(bucket string, object string, size int64, data io. | ||||
| 		} | ||||
| 	} else { | ||||
| 		// Allocate a buffer to Read() the object upload stream. | ||||
| 		buf := make([]byte, 32*1024) | ||||
| 		buf := make([]byte, readSizeV1) | ||||
| 		// Read the buffer till io.EOF and append the read data to | ||||
| 		// the temporary file. | ||||
| 		for { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user