Revert "feat: only return download url when not found"
This reverts commit 0f3fc7171b.
This commit is contained in:
parent
0f3fc7171b
commit
798fd4b37b
1 changed files with 1 additions and 3 deletions
|
|
@ -823,9 +823,7 @@ export class StorageController extends Controller {
|
|||
});
|
||||
|
||||
if (search && search.hits.hits.length === 0) {
|
||||
return {
|
||||
downloadUrl: await minioClient.presignedGetObject(DEFAULT_BUCKET, pathname),
|
||||
};
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบไฟล์");
|
||||
}
|
||||
|
||||
const { attachment, ...rest } = search.hits.hits[0]._source!;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue