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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

19 lines
407 B

2 years ago
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()