Fix .opus file uploads being misidentified by Paperclip (#28580)
This commit is contained in:
		
							parent
							
								
									f92d8c654d
								
							
						
					
					
						commit
						195b89d336
					
				| @ -11,11 +11,12 @@ module Attachmentable | |||||||
|   # For some file extensions, there exist different content |   # For some file extensions, there exist different content | ||||||
|   # type variants, and browsers often send the wrong one, |   # type variants, and browsers often send the wrong one, | ||||||
|   # for example, sending an audio .ogg file as video/ogg, |   # for example, sending an audio .ogg file as video/ogg, | ||||||
|   # likewise, MimeMagic also misreports them as such. For |   # likewise, kt-paperclip also misreports them as such. For | ||||||
|   # those files, it is necessary to use the output of the |   # those files, it is necessary to use the output of the | ||||||
|   # `file` utility instead |   # `file` utility instead | ||||||
|   INCORRECT_CONTENT_TYPES = %w( |   INCORRECT_CONTENT_TYPES = %w( | ||||||
|     audio/vorbis |     audio/vorbis | ||||||
|  |     audio/opus | ||||||
|     video/ogg |     video/ogg | ||||||
|     video/webm |     video/webm | ||||||
|   ).freeze |   ).freeze | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user