mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 13:18:06 +00:00 
			
		
		
		
	add commands for make previews of tar.gz, .ps, .txt
This commit is contained in:
		
							parent
							
								
									d87296c859
								
							
						
					
					
						commit
						fecc6d2804
					
				|  | @ -98,13 +98,22 @@ class SeedDMS_Preview_Previewer { | |||
| 				case "image/gif": | ||||
| 				case "image/jpeg": | ||||
| 				case "image/jpg": | ||||
| 				case "image/svg+xml": | ||||
| 					$cmd = 'convert -resize '.$width.'x'.$width.' '.$file.' '.$target; | ||||
| 					break; | ||||
| 				case "application/pdf": | ||||
| 				case "application/postscript": | ||||
| 					$cmd = 'convert -density 18 -resize '.$width.'x'.$width.' '.$file.'[0] '.$target; | ||||
| 					break; | ||||
| 				case "text/plain": | ||||
| 					$cmd = 'convert -resize '.$width.'x'.$width.' '.$file.'[0] '.$target; | ||||
| 					break; | ||||
| 				case "application/x-compressed-tar": | ||||
| 					$cmd = 'tar tzvf '.$file.' | convert -resize '.$width.'x'.$width.' text:-[0] '.$target; | ||||
| 					break; | ||||
| 			} | ||||
| 			if($cmd) { | ||||
| 				system( $cmd); | ||||
| 				exec($cmd); | ||||
| 			} | ||||
| 			return true; | ||||
| 		} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann