Spaces:
Runtime error
Runtime error
abhishek-akbari01 commited on
Commit ·
d012606
1
Parent(s): f957562
fix app server crash on S3 file upload
Browse files
src/shared/services/invoice.service.ts
CHANGED
|
@@ -33,14 +33,13 @@ export const uploadInvoice = async (files: Express.Multer.File[]) => {
|
|
| 33 |
|
| 34 |
return { file: file.originalname, url: downloadUrl };
|
| 35 |
|
| 36 |
-
} catch (err) {
|
| 37 |
console.error('Error uploading file', err);
|
| 38 |
-
|
| 39 |
}
|
| 40 |
});
|
| 41 |
|
| 42 |
-
return uploadPromises;
|
| 43 |
-
// return Promise.all(uploadPromises);
|
| 44 |
};
|
| 45 |
|
| 46 |
export const getDownloadUrl = async (filename: string) => {
|
|
|
|
| 33 |
|
| 34 |
return { file: file.originalname, url: downloadUrl };
|
| 35 |
|
| 36 |
+
} catch (err:any) {
|
| 37 |
console.error('Error uploading file', err);
|
| 38 |
+
return { file: file.originalname, error: err.message };
|
| 39 |
}
|
| 40 |
});
|
| 41 |
|
| 42 |
+
return Promise.all(uploadPromises);
|
|
|
|
| 43 |
};
|
| 44 |
|
| 45 |
export const getDownloadUrl = async (filename: string) => {
|