@orion-js/file-manager 3.6.2 → 3.6.3
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,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const resolvers_1 = require("@orion-js/resolvers");
|
|
4
|
+
const credentials_1 = require("../../credentials");
|
|
4
5
|
exports.default = (0, resolvers_1.modelResolver)({
|
|
5
6
|
returns: String,
|
|
6
7
|
async resolve(file, viewer) {
|
|
7
8
|
if (file.externalUrl)
|
|
8
9
|
return file.externalUrl;
|
|
10
|
+
const options = (0, credentials_1.getAWSCredentials)();
|
|
11
|
+
if (options.getFileURL)
|
|
12
|
+
return options.getFileURL(file);
|
|
9
13
|
return `https://s3.amazonaws.com/${file.bucket}/${encodeURIComponent(file.key)}`;
|
|
10
14
|
}
|
|
11
15
|
});
|
package/lib/credentials.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-js/file-manager",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.3",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"author": "nicolaslopezj",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "3925ac7f2a4806b68665d7cb07ef2f2c55b873d9"
|
|
42
42
|
}
|