mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-10-19 00:14:07 +00:00
19 lines
407 B
TypeScript
19 lines
407 B
TypeScript
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()
|