Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions src/resume-template/resume-template.controller.spec.ts

This file was deleted.

18 changes: 0 additions & 18 deletions src/resume-template/resume-template.service.spec.ts

This file was deleted.

20 changes: 0 additions & 20 deletions src/resume/resume.controller.spec.ts

This file was deleted.

18 changes: 0 additions & 18 deletions src/resume/resume.service.spec.ts

This file was deleted.

10 changes: 10 additions & 0 deletions src/upload/upload.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,17 @@ export class UploadService {
async uploadFile(file: Express.Multer.File) {
const formUploader = new qiniu.form_up.FormUploader(this.config);
const putExtra = new qiniu.form_up.PutExtra();

// 验证配置是否存在
const accessKey = this.configService.get('kodo.ACCESS_KEY');
const secretKey = this.configService.get('kodo.SECRET_KEY');
const bucket = this.configService.get('kodo.BUCKET');
const baseUrl = this.configService.get('kodo.BASE_URL');

if (!accessKey || !secretKey || !bucket || !baseUrl) {
throw new Error('Missing required Qiniu configuration. Please check your configuration file.');
}

return new Promise<Upload>((resolve, reject) => {
formUploader.put(
this.uploadToken,
Expand Down
Loading