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

feat: CID links in files table #1243

Merged
merged 3 commits into from
Apr 26, 2022
Merged

feat: CID links in files table #1243

merged 3 commits into from
Apr 26, 2022

Conversation

orvn
Copy link
Contributor

@orvn orvn commented Apr 12, 2022

  • CIDs that appear in the files table are now linked to a gateway URL
  • All links open in a new tab

Closes #1164 and #1175

@orvn orvn requested a review from dchoi27 April 12, 2022 04:12
@orvn orvn self-assigned this Apr 12, 2022
Copy link
Contributor

@dchoi27 dchoi27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! one point is that since things are wrapped in directories by default, it might be better to detect whether a file was uploaded with wrapWithDirectory: true and if so, have the link include the path to the file. but not sure if that's simple to detect - if not we can just merge.

@alanshaw
Copy link
Member

thanks! one point is that since things are wrapped in directories by default, it might be better to detect whether a file was uploaded with wrapWithDirectory: true and if so, have the link include the path to the file. but not sure if that's simple to detect - if not we can just merge.

No you can't detect that from the CID alone. You'd need to download the block, decode it, inspect the entries, if only one then link to that item.

Copy link
Contributor

@olizilla olizilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't easily do anything smarter than link to the CID on a gateway today, so let's get this PR merged so we at least have that link in the UI.

Just need to use dweb.link instead of ipfs.io and this is good to go

@olizilla
Copy link
Contributor

olizilla commented Apr 26, 2022

i'm gonna get this merged and deployed. (it feels like an important affordance for the UI and a small code change)

@olizilla olizilla merged commit dccf457 into main Apr 26, 2022
@olizilla olizilla deleted the feat/cid-links-app-ui branch April 26, 2022 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link to the content?
4 participants