Class SignedURLDataConsumer
Cloud agnostic consumer for uploading data.
Implements
Inherited Members
Namespace: Unity.Simulation
Assembly: Unity.Simulation.Core.dll
Syntax
public class SignedURLDataConsumer : BaseDataConsumer<bool>, IDataProduced
Methods
Initialize()
Initializes the signed URL uploader If not running in the cloud, or no signed URL endpoint is specified, then this consumer is disabled.
Declaration
public bool Initialize()
Returns
| Type | Description |
|---|---|
| bool |
LocalPathToObjectPath(string)
Converts a local file system path into a remote cloud path.
Declaration
public override string LocalPathToObjectPath(string localPath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | localPath | The path to the file on the local file system. |
Returns
| Type | Description |
|---|---|
| string | The remote cloud system path. |
Overrides
Upload(string, string, bool)
Synchronously uploads data to the cloud.
Declaration
public override bool Upload(string localPath, string objectPath, bool isArtifact = true)
Parameters
| Type | Name | Description |
|---|---|---|
| string | localPath | The path to the file on the local file system. |
| string | objectPath | The path to the file on the remote cloud system.. |
| bool | isArtifact | A flag indicating if object being uploaded is artifact or not. |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
UploadAsync(Stream, string, bool)
Asynchronously uploads data to the cloud.
Declaration
public override Task<bool> UploadAsync(Stream source, string objectPath, bool isArtifact = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | source | Open stream representing the data to upload. |
| string | objectPath | The path to the file on the remote cloud system.. |
| bool | isArtifact | A flag indicating if object being uploaded is artifact or not. |
Returns
| Type | Description |
|---|---|
| Task<bool> |