Skip to content

Commit 76e7b20

Browse files
committed
fix retuning wrong public url on put()
1 parent 02b300f commit 76e7b20

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coin-mirror/blob",
3-
"version": "0.1.5",
3+
"version": "0.1.7",
44
"type": "module",
55
"module": "src/index.ts",
66
"exports": {
@@ -19,7 +19,10 @@
1919
},
2020
"main": "dist/index.js",
2121
"author": "Maximilian Pfennig <max@coin-mirror.org>",
22-
"repository": "https://github.com/coin-mirror/blob",
22+
"repository": {
23+
"type": "git",
24+
"url": "git+https://github.com/coin-mirror/blob.git"
25+
},
2326
"bugs": {
2427
"url": "https://github.com/coin-mirror/blob/issues",
2528
"email": "tech@coin-mirror.org"

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const put = async (
2424
);
2525

2626
return {
27-
url: `https://${bucket.publicUrl}/${path}`,
27+
url: new URL(path, bucket.publicUrl).toString(),
2828
etag: res.ETag,
2929
expiration: res.Expiration,
3030
versionId: res.VersionId,

0 commit comments

Comments
 (0)