@easy-cms/storage-s3 0.66.1 → 0.67.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.
- package/dist/index.js +6 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -16,6 +16,12 @@ function s3Storage(options) {
|
|
|
16
16
|
return {
|
|
17
17
|
name: "s3",
|
|
18
18
|
apiVersion: 1,
|
|
19
|
+
// Where browsers send large files (`uploadURL`); the region may come from the environment.
|
|
20
|
+
get uploadOrigins() {
|
|
21
|
+
const env = process.env;
|
|
22
|
+
const region = options.region ?? env.AWS_REGION ?? env.AWS_DEFAULT_REGION ?? "us-east-1";
|
|
23
|
+
return [new URL(bucketURL(options, region)("x")).origin];
|
|
24
|
+
},
|
|
19
25
|
init() {
|
|
20
26
|
const env = process.env;
|
|
21
27
|
const accessKeyId = options.accessKeyId ?? env.AWS_ACCESS_KEY_ID;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easy-cms/storage-s3",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.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.
|
|
22
|
+
"@easy-cms/core": "^0.67.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"sharp": "^0.35.5",
|
|
26
|
-
"@easy-cms/core": "^0.
|
|
27
|
-
"@easy-cms/db-sqlite": "^0.
|
|
26
|
+
"@easy-cms/core": "^0.67.0",
|
|
27
|
+
"@easy-cms/db-sqlite": "^0.67.0"
|
|
28
28
|
},
|
|
29
29
|
"engines": {
|
|
30
30
|
"node": ">=22.12"
|