UploadFileToStorage
Uploads a file to the data store.
def UploadFileToStorage(
ctx: context.Context,
filePath: string,
toPath: storage.DataReference,
size: int64,
store: storage.DataStore
) - > error
Uploads a file to the data store.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and tracing. |
| filePath | string | The local file path of the file to be uploaded. |
| toPath | storage.DataReference | The destination path within the data store where the file will be stored. |
| size | int64 | The size of the file in bytes. |
| store | storage.DataStore | The data store instance to which the file will be uploaded. |
Returns
| Type | Description |
|---|---|
error | An error if the file cannot be opened or written to the data store, otherwise nil. |