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

set WebFile fpath to URL base #158

Merged
merged 1 commit into from
Mar 22, 2019
Merged

set WebFile fpath to URL base #158

merged 1 commit into from
Mar 22, 2019

Conversation

jmank88
Copy link
Contributor

@jmank88 jmank88 commented Mar 22, 2019

This PR sets the fpath for WebFiles to the 'base' of the URL, which is the base of the path if non-empty, otherwise the host.
Follow up from #154

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

I think we need to handle files with duplicate names. That is, check to see if the file already exists in the map, and, if so, pick a new filename.

@jmank88
Copy link
Contributor Author

jmank88 commented Mar 22, 2019

Now ipfs add "http://test/test" "http://different/test" "http://another/test" "http://more/test?param=value" produces:

test
test (1)
test (2)
test (3)

@Stebalien Stebalien merged commit 03b1446 into ipfs:master Mar 22, 2019
@jmank88 jmank88 deleted the webfile-fpath branch March 22, 2019 17:13
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