mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 02:57:57 +00:00 
			
		
		
		
	 af020f446e
			
		
	
	af020f446e
	
	
	
		
			
			When sending the message with audio, only the signed id of the file is sent. In the back end check only the UploadedFile type. The attachment has the default file type image, now it gets the content type from the signed id Fixes: #5375 Co-authored-by: Sojan Jose <sojan@pepalo.com>
		
			
				
	
	
		
			10 lines
		
	
	
		
			242 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			242 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| module FileUploadHelpers
 | |
|   def get_blob_for(file_path, content_type)
 | |
|     ActiveStorage::Blob.create_and_upload!(
 | |
|       io: File.open(file_path, 'rb'),
 | |
|       filename: File.basename(file_path),
 | |
|       content_type: content_type
 | |
|     )
 | |
|   end
 | |
| end
 |