1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-07 22:50:05 +00:00

fix(upload): added query param as well for filepath

This commit is contained in:
Saad Jutt
2022-02-28 22:34:18 +05:00
parent 8c1941a87b
commit feeec4eb14
5 changed files with 56 additions and 13 deletions

View File

@@ -129,10 +129,11 @@ export class DriveController {
})
@Post('/file')
public async saveFile(
@FormField() filePath: string,
@UploadedFile() file: Express.Multer.File
@UploadedFile() file: Express.Multer.File,
@Query() _filePath?: string,
@FormField() filePath?: string
): Promise<UpdateFileResponse> {
return saveFile(filePath, file)
return saveFile((_filePath ?? filePath)!, file)
}
/**