vtlab-generic-functions 1.0.35 → 1.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/s3bucket/index.js +2 -1
package/package.json
CHANGED
package/s3bucket/index.js
CHANGED
|
@@ -149,9 +149,10 @@ const uploadFilesToS3 = async (path, files, extension = 'pdf', options = {
|
|
|
149
149
|
if (files.length === 0 || !path) {
|
|
150
150
|
return "";
|
|
151
151
|
}
|
|
152
|
+
let randonId = Math.random().toString(36).substring(2, 15);
|
|
152
153
|
|
|
153
154
|
return promisesCollector(files, async (_file) => {
|
|
154
|
-
let _path = `${path}${new Date().getTime()}.${extension}`;
|
|
155
|
+
let _path = `${path}${new Date().getTime()}${randonId}.${extension}`;
|
|
155
156
|
try {
|
|
156
157
|
let file = Buffer.from(_file.content, "base64");
|
|
157
158
|
return uploadToS3(_path, file, options);
|