1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

add multiple storage types

This commit is contained in:
alexcos20 2021-12-03 00:30:27 -08:00
parent e14ee28b05
commit e0111575df

View File

@ -196,12 +196,68 @@ 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>Key</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"]
[
{
"url":{
"url":"https://url.com/file1.csv",
"method":"GET"
}
},
{
"url":{
"url":"https://url.com/file2.csv",
"method":"POST"
}
}
]
```
</td>
</tr></table>
First class integrations supported in the future :
<table>
<tr>
<th>Key</th>
<th>Description</th>
<th>Example</th>
</tr>
<tr>
<td>"ipfs"</td><td>IPFS files</td>
<td>
```json
[
{ "ipfs": { "hash":"XXX"}}
]
```
</td>
<tr><td>"filecoin"</td><td>Filecoin storage</td><td>&nbsp;</td></tr>
<tr><td>"arwave"</td><td>Arwave</td><td>&nbsp;</td></tr>
<tr><td>"storj"</td><td>Storj</td><td>&nbsp;</td></tr>
<tr><td>"sql"</td><td>Sql connection, dataset is generated by a query</td><td>&nbsp;</td></tr>
</table>
A service can contain multiple files, using multiple storage types.
To get information about the files after encryption, the `/fileinfo` endpoint of _Provider_ returns based on a passed DID an array of file metadata:
```json