Added mime check to svg check so that it doesn't try to load every upload into memory
This commit is contained in:
		
							parent
							
								
									152e55b5db
								
							
						
					
					
						commit
						30761e6d1f
					
				| @ -67,6 +67,10 @@ class SVGFileHandler extends DataHandlerExtension | ||||
| 
 | ||||
|     protected function check_contents(string $file): bool | ||||
|     { | ||||
|         if (getMimeType($file)!="image/svg+xml") { | ||||
|             return false; | ||||
|         } | ||||
| 
 | ||||
|         $msp = new MiniSVGParser($file); | ||||
|         return bool_escape($msp->valid); | ||||
|     } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user