You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
			
		
		
		
		
			
		
			
				
					
					
						
							18 lines
						
					
					
						
							407 B
						
					
					
				
			
		
		
	
	
							18 lines
						
					
					
						
							407 B
						
					
					
				| import FileService from '../service/FileService' | |
|  | |
| class FileController { | |
|   private service: FileService = new FileService() | |
|  | |
|   upload = async (ctx) => { | |
|     const files = ctx.request.files.file | |
|     console.log(files) | |
|  | |
|     if (files.length === undefined) { | |
|       this.service.upload(ctx, files, false) | |
|     } else { | |
|       this.service.upload(ctx, files, true) | |
|     } | |
|   } | |
| } | |
|  | |
| export default new FileController()
 | |
| 
 |