Fixed no file error
This commit is contained in:
parent
5be70cff2e
commit
42c72713fb
@ -32,12 +32,13 @@ export default class BucketController extends ApiController {
|
||||
|
||||
const fileName = office.rib_name;
|
||||
if(!fileName) {
|
||||
this.httpNotFoundRequest(response, "No file found");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const file = await this.bucketService.getByUid(uid, fileName);
|
||||
response.attachment(fileName);
|
||||
const file = await this.bucketService.getByUid(uid, fileName!);
|
||||
response.attachment(fileName!);
|
||||
response.send(file.Body);
|
||||
} catch (error) {
|
||||
this.httpInternalError(response, error);
|
||||
|
Loading…
x
Reference in New Issue
Block a user