streamby-core 0.9.9 → 0.9.11

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,14 +19,14 @@ function createS3Adapter(config) {
19
19
  async getPresignedUrl(filename, contentType, projectId) {
20
20
  const salt = await bcrypt_1.default.genSalt();
21
21
  const hashedPassword = await bcrypt_1.default.hash(filename, salt);
22
- const key = encodeURIComponent(`${projectId}/${contentType}/file-${Date.now()}-${hashedPassword}`);
22
+ const key = `${projectId}/${contentType}/file-${Date.now()}-${hashedPassword}`;
23
23
  const command = new client_s3_1.PutObjectCommand({
24
24
  Bucket: config.bucket,
25
25
  Key: key,
26
26
  ContentType: contentType,
27
27
  });
28
28
  const url = await (0, s3_request_presigner_1.getSignedUrl)(s3, command, { expiresIn: 60 });
29
- const publicUrl = `https://${config.bucket}.s3.${config.region}.amazonaws.com/${key}`;
29
+ const publicUrl = encodeURIComponent(`https://${config.bucket}.s3.${config.region}.amazonaws.com/${key}`);
30
30
  return { url, publicUrl };
31
31
  },
32
32
  async listFiles(projectId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "streamby-core",
3
- "version": "0.9.9",
3
+ "version": "0.9.11",
4
4
  "description": "StreamBy middleware framework for media storage management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",