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

Add support for uploading files linked to on a page, using the context menu #515

Merged
merged 2 commits into from Jul 5, 2018

Conversation

PurgingPanda
Copy link
Contributor

@PurgingPanda PurgingPanda commented Jul 3, 2018

#513

Very simple addition so you can upload files that are linked to on a page. For example pdf files so you do not have to download them and manually upload them.

A current problem I noticed is that when trying to upload links directly from google search results it opens a print dialog. This seems be fixed when using an extension that removes google redirect links. https://addons.mozilla.org/en-US/firefox/addon/google-no-tracking-url/?src=search

Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Thank you! 👍

This is a good feature and works really well on links to big images but I was worried about user doing this on a link to a file where name matters or is a HTML page, so I tweaked it a a bit :)

UX problem

Executing on a link to other page will fetch HTML, upload it to IPFS and then open it in a new tab, and as it is HTML, it will render the webpage, often broken due to changes in Images/CSS/JS paths. Not a great experience when you miss-click.

Potential Solution

We don't want to remove options, so let's give users more choice!
As a drive by commit added to this PR added a second option that lets users choose if filename of uploaded link should be persisted. I believe it makes a lot sense for things like PDF, ZIP, or even images. I also changed language to match one from ipfs/ipfs-gui#35:

screenshot_44

Test via context menu on this link:

https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Doma%C5%BElice%2C_Jir%C3%A1skova_43_(9102).jpg/320px-Doma%C5%BElice%2C_Jir%C3%A1skova_43_(9102).jpg?foo=bar#buzz

@lidel lidel merged commit 999682b into ipfs:master Jul 5, 2018
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.

None yet

2 participants