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
Multiple storage types #837
Conversation
✔️ Deploy Preview for docs-oceanprotocol ready! 🔨 Explore the source changes: 0160fdd 🔍 Inspect the deploy log: https://app.netlify.com/sites/docs-oceanprotocol/deploys/61af32351a82e500076c0ab4 😎 Browse the preview: https://deploy-preview-837--docs-oceanprotocol.netlify.app |
|
||
```json | ||
[ | ||
{ | ||
"type": "url", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we need this on the market or if it's needed what would it be useful to ? or do we need that info in another component ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most likely, storage types are going to expose different information types. For instance, sql will probably not have a contentType or event contentLenght
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aa got it 😃 thanks
"ipfs": { | ||
"hash": "XXXX" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if can find a more generic way of representing the file info object and have some proper typings for it. As it looks like it would be really though since we are going to support storage types like ipfs or sql
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or we could have something like:
[
{ "type": "url",
"url": "https://xx",
"method": "POST"
},
{ "type": "ipfs",
"hash": "XXXX"
}
]
it would make typings more clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree with the proposed structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also opting for the structure proposed above, easier to extend and we can have method/has/..etc optional in the typings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to match the last proposed structure
@bogdanfazakas @mihaisc - all good? can we merge it ? |
all good from my point of view |
Support for multiple storage types