pinata 1.3.0 → 1.4.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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1355,7 +1355,13 @@ var createSignedURL = async (config, options, imgOpts) => {
|
|
|
1355
1355
|
if (!config) {
|
|
1356
1356
|
throw new ValidationError("Pinata configuration is missing");
|
|
1357
1357
|
}
|
|
1358
|
-
let
|
|
1358
|
+
let baseUrl;
|
|
1359
|
+
if (options?.gateway) {
|
|
1360
|
+
baseUrl = options.gateway.startsWith("https://") ? options.gateway : `https://${options.gateway}`;
|
|
1361
|
+
} else {
|
|
1362
|
+
baseUrl = config.pinataGateway;
|
|
1363
|
+
}
|
|
1364
|
+
let newUrl = `${baseUrl}/files/${options.cid}`;
|
|
1359
1365
|
const params = new URLSearchParams();
|
|
1360
1366
|
if (imgOpts) {
|
|
1361
1367
|
if (imgOpts.width)
|