上门预约后台管理系统
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
415 B

  1. import FileService from '../service/FileService';
  2. class FileController {
  3. private service: FileService = new FileService();
  4. upload = async (ctx) => {
  5. const files = ctx.request.files.file;
  6. console.log(files);
  7. if (files.length === undefined) {
  8. this.service.upload(ctx, files, false);
  9. } else {
  10. this.service.upload(ctx, files, true);
  11. }
  12. };
  13. }
  14. export default new FileController();