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;
|
const fileName = office.rib_name;
|
||||||
if(!fileName) {
|
if(!fileName) {
|
||||||
|
this.httpNotFoundRequest(response, "No file found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const file = await this.bucketService.getByUid(uid, fileName);
|
const file = await this.bucketService.getByUid(uid, fileName!);
|
||||||
response.attachment(fileName);
|
response.attachment(fileName!);
|
||||||
response.send(file.Body);
|
response.send(file.Body);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.httpInternalError(response, error);
|
this.httpInternalError(response, error);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user