@easy-cms/storage-s3 0.47.4 → 0.48.0

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -65,7 +65,12 @@ function s3Storage(options) {
65
65
  if (!response.ok) throw await s3Error("GET", key, response);
66
66
  const body = new Uint8Array(await response.arrayBuffer());
67
67
  const total = Number(response.headers.get("content-range")?.split("/")[1]);
68
- return { body, size: Number.isFinite(total) && total > 0 ? total : body.byteLength };
68
+ const contentType = response.headers.get("content-type");
69
+ return {
70
+ body,
71
+ size: Number.isFinite(total) && total > 0 ? total : body.byteLength,
72
+ ...contentType ? { contentType } : {}
73
+ };
69
74
  },
70
75
  async get(key) {
71
76
  const response = await request(key, { method: "GET" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easy-cms/storage-s3",
3
- "version": "0.47.4",
3
+ "version": "0.48.0",
4
4
  "description": "S3-compatible upload storage for Easy CMS: AWS S3, Cloudflare R2, MinIO",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,12 +19,12 @@
19
19
  "aws4fetch": "^1.0.20"
20
20
  },
21
21
  "peerDependencies": {
22
- "@easy-cms/core": "^0.47.4"
22
+ "@easy-cms/core": "^0.48.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "sharp": "^0.35.5",
26
- "@easy-cms/core": "^0.47.4",
27
- "@easy-cms/db-sqlite": "^0.47.4"
26
+ "@easy-cms/core": "^0.48.0",
27
+ "@easy-cms/db-sqlite": "^0.48.0"
28
28
  },
29
29
  "engines": {
30
30
  "node": ">=22.12"