Browse Source
			
			
			Merge pull request #135 from agin719/cos-v4-dev
			
				add get object url
			
			
				master
			
			
		 
		
			
				
					
						
						agin719
					
					4 years ago
					
						
							committed by
							
								
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
				  
				  No known key found for this signature in database
				  
				  	
						GPG Key ID: 4AEE18F83AFDEB23
				  	
				  
				
			
		
		
		
	
		
			
				 1 changed files with 
5 additions and 
0 deletions
			 
			
		 
		
			
				- 
					
					
					 
					object.go
				
 
			
		
		
			
				
					
					
						
							
								
									
										
											
	
		
			
				| 
					
					
						
							
						
					
					
				 | 
				@ -107,6 +107,11 @@ func (s *ObjectService) GetToFile(ctx context.Context, name, localpath string, o | 
			
		
		
	
		
			
				 | 
				 | 
					return resp, nil | 
				 | 
				 | 
					return resp, nil | 
			
		
		
	
		
			
				 | 
				 | 
				} | 
				 | 
				 | 
				} | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				func (s *ObjectService) GetObjectURL(name string) *url.URL { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
					uri, _ := url.Parse("/" + encodeURIComponent(name, []byte{'/'})) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
					return s.client.BaseURL.BucketURL.ResolveReference(uri) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				} | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				type PresignedURLOptions struct { | 
				 | 
				 | 
				type PresignedURLOptions struct { | 
			
		
		
	
		
			
				 | 
				 | 
					Query  *url.Values  `xml:"-" url:"-" header:"-"` | 
				 | 
				 | 
					Query  *url.Values  `xml:"-" url:"-" header:"-"` | 
			
		
		
	
		
			
				 | 
				 | 
					Header *http.Header `header:"-,omitempty" url:"-" xml:"-"` | 
				 | 
				 | 
					Header *http.Header `header:"-,omitempty" url:"-" xml:"-"` | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
					
				 | 
				
  |