mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Merge pull request #837 from oceanprotocol/feature/v4_multiple_storage
Multiple storage types
This commit is contained in:
commit
70aa72a707
@ -196,21 +196,94 @@ Example:
|
||||
}
|
||||
```
|
||||
|
||||
During the publish process, file URLs must be encrypted with a respective _Provider_ API call before storing the DDO on-chain. For this an array of strings with one or multiple URLs is what gets encrypted and send to _Provider_:
|
||||
During the publish process, file URLs must be encrypted with a respective _Provider_ API call before storing the DDO on-chain. For this an array of objects defining the storage access details are sent.
|
||||
|
||||
|
||||
Type of objects supported :
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Example</th>
|
||||
</tr>
|
||||
<td>'url'</td>
|
||||
<td>Static URL. Contains url and HTTP method</td>
|
||||
<td>
|
||||
|
||||
```json
|
||||
["https://url.com/file1.csv", "https://url.com/file2.csv"]
|
||||
[
|
||||
{
|
||||
"type": "url",
|
||||
"url": "https://url.com/file1.csv",
|
||||
"method": "GET"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
To get information about the files after encryption, the `/fileinfo` endpoint of _Provider_ returns based on a passed DID an array of file metadata:
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
First class integrations supported in the future :
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Example</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"ipfs"</td><td>IPFS files</td>
|
||||
<td>
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"type":"ipfs",
|
||||
"hash": "XXX"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
</td>
|
||||
|
||||
<tr><td>"filecoin"</td><td>Filecoin storage</td><td> </td></tr>
|
||||
<tr><td>"arwave"</td><td>Arwave</td><td> </td></tr>
|
||||
<tr><td>"storj"</td><td>Storj</td><td> </td></tr>
|
||||
<tr><td>"sql"</td><td>Sql connection, dataset is generated by a query</td><td> </td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
A service can contain multiple files, using multiple storage types.
|
||||
|
||||
Example:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"type": "url",
|
||||
"url": "https://url.com/file1.csv",
|
||||
"method": "GET"
|
||||
|
||||
},
|
||||
{
|
||||
"type": "ipfs",
|
||||
"hash": "XXXX"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
To get information about the files after encryption, the `/fileinfo` endpoint of _Provider_ returns based on a passed DID an array of file metadata (based on the file type):
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"type": "url",
|
||||
"contentLength": 100,
|
||||
"contentType": "application/json"
|
||||
},
|
||||
{
|
||||
"type": "ipfs",
|
||||
"contentLength": 130,
|
||||
"contentType": "application/text"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user