Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import local files to ipfs #15078

Closed
spylogsster opened this issue Apr 1, 2021 · 3 comments · Fixed by brave/brave-core#8423
Closed

Import local files to ipfs #15078

spylogsster opened this issue Apr 1, 2021 · 3 comments · Fixed by brave/brave-core#8423

Comments

@spylogsster
Copy link

image

Description

Add IPFS submenu to the main app menu and add an item to import local file to ipfs.
Copy sharable link if import successful

Expected result:

File accessable by public gateway sharable link

@lidel
Copy link

lidel commented Apr 2, 2021

  • Shareable link should use Gateway selected by user or dweb.link if no choice was made.
  • If a single file was imported, copy direct link that looks like this: https://dweb.link/ipfs/{fileCid}?filename={filename}
  • If you want to support import of multiple files at the same time, then you copy the CID of the root directory https://dweb.link/ipfs/{dirCid}
  • Prewarm shared gateway link
    • Initial load of shared link may take time (gateway needs to find content first, and fetch it), so sending asynchronous HTTP HEAD to the gateway speeds things up (eg. https://dweb.link/ipfs/{cid})
    • It is acceptable because it only triggers content lookup that would happen anyway after other person opens shared link, and no privacy is decreased, because gateway will find the IP of original provider anyway.

@rebron
Copy link
Collaborator

rebron commented Apr 5, 2021

cc: @karenkliu

@stephendonner
Copy link

stephendonner commented Apr 21, 2021

Verified PASSED using brave/brave-core#8423 with build

Brave 1.25.28 Chromium: 90.0.4430.72 (Official Build) nightly (x86_64)
Revision b6172ef8d07ef486489a4b11b66b2eaeed50d132-refs/branch-heads/4430@{#1233}
OS macOS Version 11.2.3 (Build 20D91)

Steps:

  1. loaded ipns://en.wikipedia-on-ipfs.org
  2. clicked on Use a local node
  3. waited until installation and configuration finished
  4. loaded https://archive.org/details/spellbound1945_202001
  5. context-clicked on the MPEG4 link and chose Save link as...
  6. saved Spellbound (1945, USA) Director Alfred Hitchcock Starring Ingrid Bergman, Gregory Peck - Film Noir.mp4 to desktop
  7. clicked the hamburger menu, chose top-level IPFS > Share Local File using IPFS
  8. chose Spellbound (1945, USA) Director Alfred Hitchcock Starring Ingrid Bergman, Gregory Peck - Film Noir.mp4
  9. waited
  10. once I got the system notification for the shared IPFS-content link, I pasted it from clipboard into Slack
  11. on my Windows 10 machine, using nightly, clicked on the https://dweb.link/ipfs/QmfRpQsfixeYHbJF2vqQH4ZBJ8DWmVTXX8oKpoYGZLT2qJ?filename=Spellbound+(1945%2C+USA)+Director+Alfred+Hitchcock+Starring+Ingrid+Bergman%2C+Gregory+Peck+-+Film+Noir.mp4 link and waited
  12. it took around 10 minutes (as @spylogsster said) for the link to resolve and then it quickly downloaded and started playing on my Windows 10 machine
example example example example
Screen Shot 2021-04-21 at 9 04 44 AM Screen Shot 2021-04-21 at 8 55 15 AM Screen Shot 2021-04-21 at 9 18 02 AM spellbound

Verification passed on

Brave 1.25.59 Chromium: 90.0.4430.212 (Official Build) beta (64-bit)
Revision e3cd97fc771b893b7fd1879196d1215b622c2bed-refs/branch-heads/4430@{#1429}
OS Ubuntu 18.04 LTS

Verified test plan from brave/brave-core#8423

image


Verification passed on


Brave | 1.25.57 Chromium: 90.0.4430.93 (Official Build) beta (64-bit)
-- | --
Revision | 4df112c29cfe9a2c69b14195c0275faed4e997a7-refs/branch-heads/4430@{#1348}
OS | Windows 10 OS Version 2004 (Build 19041.985)

example example example
image image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment