mirror of
				https://github.com/D4M13N-D3V/comissions-app-core-api.git
				synced 2025-10-31 09:35:25 +00:00 
			
		
		
		
	fix: adde dnull check
This commit is contained in:
		
							parent
							
								
									8f50f3b6c3
								
							
						
					
					
						commit
						202ee68e4b
					
				| @ -17,6 +17,10 @@ namespace comissions.app.api.Services.Storage | |||||||
| 
 | 
 | ||||||
|         public async Task<string> UploadImageAsync(Stream fileStream, string fileName) |         public async Task<string> UploadImageAsync(Stream fileStream, string fileName) | ||||||
|         { |         { | ||||||
|  |             if(fileStream== null) | ||||||
|  |             { | ||||||
|  |                 throw new System.ArgumentNullException(nameof(fileStream)); | ||||||
|  |             } | ||||||
|             using var content = new MultipartFormDataContent(); |             using var content = new MultipartFormDataContent(); | ||||||
|             content.Add(new StringContent(ApiKey), "key"); |             content.Add(new StringContent(ApiKey), "key"); | ||||||
|             content.Add(new StreamContent(fileStream), "source", fileName); |             content.Add(new StreamContent(fileStream), "source", fileName); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Damien Ostler
						Damien Ostler