---
title: "Class LocalUploadSource"
slug: "web-sdk--stylelabs.m.sdk.webclient.models.upload.localuploadsource"
abstract: ""
---
# Class LocalUploadSource

Provides access to a file in the local file system that will be uploaded to Content Hub.

## Inheritance

object

LocalUploadSource

## Implements

[IUploadSource](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.sdk.webclient.contracts.upload.iuploadsource.html)

## Namespace: StylelabsStylelabs.MSdkWebClientModelsUpload

## Assembly: Stylelabs.M.Sdk.WebClient.dll

## Syntax

```csharp
public class LocalUploadSource : IUploadSource
```

## Constructors

### LocalUploadSource(string, string)

Initializes a new instance of the [LocalUploadSource](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.sdk.webclient.models.upload.localuploadsource.html) class.

#### Declaration

```csharp
public LocalUploadSource(string path, string name = "")
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | path | The local file path pointing to the file. |
| string | name | The file name. |

## Properties

### Name

Gets the name of the file.

#### Declaration

```csharp
public string Name { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |

## Methods

### GetStreamAsync()

Gets a to access the underlying source.

#### Declaration

```csharp
public Task<Stream> GetStreamAsync()
```

#### Returns

| Type | Description |
| --- | --- |
| Task<>Stream | A . |

### Implements

[IUploadSource](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.sdk.webclient.contracts.upload.iuploadsource.html)
