Constructor
new FileServer(sdk, serverUrl, opts)
Create a new wallet server instance.
- Source:
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sdk |
ShelfNetwork
|
Parent SDK instance. |
|||||||||||||||||||||||||||||||||||
serverUrl |
string
|
wallet server URL. |
|||||||||||||||||||||||||||||||||||
opts |
Object
|
|
Methods
get(fileId) → {Promise.<JsonApiResponse>}
Get a file by ID.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
fileId |
string
|
File ID. |
getPage(queryopt) → {Promise.<JsonApiResponse>}
Get personal files.
- Source:
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
query |
object
|
<optional> |
Request options.
|
upload(file, opts) → {Promise.<JsonApiResponse>}
Uploads a file to the storage server.
- Source:
Parameters:
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
file |
File
|
Blob
|
ReadableStream
|
A file to upload. |
||||||||||||||||||||
opts |
object
|
Document options.
|