ipfs-webui icon indicating copy to clipboard operation
ipfs-webui copied to clipboard

Feature: Add `Open in Gateway`

Open FledgeXu opened this issue 4 years ago • 4 comments

Is your feature request related to a problem? Please describe. In #1813, the user wants a feature which is showing the downloading progress in the WebUI. However, If users can download through the browser, they can get the download progress they want. So if we can add a new Button called Open in Gateway orOpen in Browser, it will be convenient.

Describe the solution you'd like Before: image After: image

Describe alternatives you've considered Or Add a Button to help users copy the gateway URL of a file.

Additional context We can use ipfs config Addresses.Gateway to get Gateway address.

FledgeXu avatar Jul 02 '21 09:07 FledgeXu

Notes from triage:

  • let's not add another action, it will be confusing (proposed one is a duplicate of Share)
  • right now the Download button uses JS API and a blob: as a source
  • fix here is to switch to HTTP link at a local gateway
    • single file would have /ipfs/{cid}?filename=foo&download=true to ensure proper `content-disposition
    • a directory – tbd, either /api/v0/ or ?format=tar (whichever is available when this is tackled)
      • ideally, we would implement this when /ipfs/<cid>?filename=foo&format=tar is provided (https://github.com/ipfs/go-ipfs/issues/8234), but faking it with something like ``/api/v0/get/?arg=&archive=true&compress=true&filename=foo.tar.gz` could also work

lidel avatar Jul 02 '21 13:07 lidel

I agree with changing the Download button instead of adding a new action. About directory downloading,?format=tar needs ipfs/go-ipfs#8234. However, Windows doesn't support tar unarchive. Maybe using zip is a better choice?

FledgeXu avatar Jul 03 '21 13:07 FledgeXu

@FledgeXu You mean GUI? Support for tar has been included in Microsoft Windows since Windows 10: https://techcommunity.microsoft.com/t5/containers/tar-and-curl-come-to-windows/ba-p/382409

Adding ZIP would require changes to go-ipfs – blocked by https://github.com/ipfs/go-ipfs/issues/6104

lidel avatar Jul 30 '21 13:07 lidel

@lidel Yes, I just tested it. Windows still doesn't support the *.tar in GUI. image

FledgeXu avatar Jul 31 '21 06:07 FledgeXu

I believe this should be fixed with https://github.com/ipfs/ipfs-webui/pull/1894. Please let us know if you continue to have issues.

SgtPooki avatar Nov 29 '22 20:11 SgtPooki