streamby-core 0.9.15 → 0.9.17

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.
@@ -1,12 +1,8 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.createS3Adapter = createS3Adapter;
7
4
  const client_s3_1 = require("@aws-sdk/client-s3");
8
5
  const s3_request_presigner_1 = require("@aws-sdk/s3-request-presigner");
9
- const bcrypt_1 = __importDefault(require("bcrypt"));
10
6
  function createS3Adapter(config) {
11
7
  const s3 = new client_s3_1.S3Client({
12
8
  region: config.region,
@@ -17,9 +13,7 @@ function createS3Adapter(config) {
17
13
  });
18
14
  return {
19
15
  async getPresignedUrl(filename, contentType, projectId) {
20
- const salt = await bcrypt_1.default.genSalt();
21
- const hashed = await bcrypt_1.default.hash(filename, salt).then(result => result.replace(/\//g, '-'));
22
- const key = `${projectId}/${contentType}/file-${Date.now()}-${hashed}`;
16
+ const key = `${projectId}/${contentType}/file-${Date.now()}`;
23
17
  const command = new client_s3_1.PutObjectCommand({
24
18
  Bucket: config.bucket,
25
19
  Key: key,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "streamby-core",
3
- "version": "0.9.15",
3
+ "version": "0.9.17",
4
4
  "description": "StreamBy middleware framework for media storage management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",