pangea-server 3.3.150 → 3.3.152

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.
@@ -19,7 +19,7 @@ const s3 = new aws_sdk_1.default.S3({
19
19
  accessKeyId: (0, env_helpers_1.getEnvStr)('DIGITAL_OCEAN_SPACES_ACCESS_KEY'),
20
20
  secretAccessKey: (0, env_helpers_1.getEnvStr)('DIGITAL_OCEAN_SPACES_SECRET_KEY'),
21
21
  });
22
- const expiresTime = 60;
22
+ const expiresTime = 60 * 10;
23
23
  class FileStorage {
24
24
  static GenerateDownloadUrl(fileName) {
25
25
  return s3.getSignedUrlPromise('getObject', { Bucket: bucketName, Key: fileName, Expires: expiresTime });
@@ -91,7 +91,7 @@ class FileStorage {
91
91
  exports.FileStorage = FileStorage;
92
92
  // internal functions
93
93
  function getGeneralUploadParams(config) {
94
- const fileName = `${config.folder}/${(0, random_helpers_1.getRandomString)('short')}`;
94
+ const fileName = `${config.folder}/${(0, random_helpers_1.getRandomString)('short')}/${config.fileType}`;
95
95
  return { Bucket: bucketName, Key: fileName, ContentType: config.fileType, ACL: 'private' };
96
96
  }
97
97
  async function uploadFile(body, config) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pangea-server",
3
3
  "description": "",
4
- "version": "3.3.150",
4
+ "version": "3.3.152",
5
5
  "engines": {
6
6
  "node": "22.14.0"
7
7
  },