Skip to content

Commit ff49478

Browse files
committed
fix: preserve filename during import
License: MIT Signed-off-by: Marcin Rataj <[email protected]>
1 parent 2112a49 commit ff49478

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/add-to-ipfs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ module.exports = async function ({ getIpfsd, launchWebUI }, files) {
107107

108108
const { cid, path } = await makeShareableObject(ipfsd.api, successes)
109109
sendNotification(failures, successes, launchWebUI, path)
110-
111-
const url = `https://ipfs.io/ipfs/${cid.toString()}`
110+
const filename = path ? `?filename=${encodeURIComponent(path.split('/').pop())}` : ''
111+
const url = `https://dweb.link/ipfs/${cid.toString()}${filename}`
112112
clipboard.writeText(url)
113113
}

0 commit comments

Comments
 (0)