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

checkURL interface #542

Closed
wants to merge 5 commits into from
Closed

checkURL interface #542

wants to merge 5 commits into from

Conversation

alexcos20
Copy link
Member

No description provided.

@alexcos20 alexcos20 self-assigned this Jan 13, 2021
@alexcos20 alexcos20 marked this pull request as draft January 13, 2021 16:18
Copy link
Contributor

@calina-c calina-c left a comment

Choose a reason for hiding this comment

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

nice :D

@kremalicious
Copy link
Contributor

So is it possible to get that method without initializing the whole ocean object? Otherwise we would need to block adding any files in UI as long as user does not have any wallet connected

@kremalicious
Copy link
Contributor

not sure yet why oceanprotocol/provider#57 introduces /checkUrl & /assetInfo and what is best to use here

@alexcos20
Copy link
Member Author

So is it possible to get that method without initializing the whole ocean object? Otherwise we would need to block adding any files in UI as long as user does not have any wallet connected

You need a provider class. That should be possible without web3

@alexcos20
Copy link
Member Author

not sure yet why oceanprotocol/provider#57 introduces /checkUrl & /assetInfo and what is best to use here

checkUrl takes an URL (http:///www.example.com) and check if your selected provider is able to access it and gets file information (length & type)
/assetInfo takes a DID with some files (you don't have the URLs) and will send back the same interface, but with updated values.

Let's say that you published www.example.com as DID1. and you are updating the content, but in the DDO you still have the old length of the file. By calling /assetInfo, provider can decrypt the URLs , check if they are still valid, get the file info and then you can update your DDO with the new info

@codeclimate
Copy link

codeclimate bot commented Jan 14, 2021

Code Climate has analyzed commit 2a1af0d and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 83.3% (50% is the threshold).

This pull request will bring the total coverage in the repository to 77.7% (0.2% change).

View more on Code Climate.

@alexcos20
Copy link
Member Author

superseded by #544

@alexcos20 alexcos20 closed this Jan 14, 2021
@alexcos20 alexcos20 deleted the feature/checkURL branch February 13, 2021 06:52
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.

3 participants