# nsc artifact upload

Upload an artifact.

`artifact upload` uploads an [artifact](/content/docs/architecture/storage/artifact-storage.md) for this workspace. Currently, only single file uploads are supported.

## Usage

```bash theme={null}
nsc artifact upload <src> <dest> [--expires_in <duration>] [--namespace <namespace>] [--pack <pattern>]
```

### Example

```sh theme={null}
% nsc artifact upload text.txt target.txt
Uploaded text.txt to target.txt (namespace main)
```

## Options

### --expires\_in <duration>

Sets the expiration time for the artifact. By default, artifacts do not expire. The duration is specified as a time duration string (e.g., "72h", "30m", "1h30m"). Valid time units are "ns" (nanoseconds), "us" or "µs" (microseconds), "ms" (milliseconds), "s" (seconds), "m" (minutes), and "h" (hours).

### --namespace <namespace>

Target namespace of the artifact.

### --pack <pattern>

A glob pattern used to select the files that should be zipped up and uploaded as the artifact, instead of uploading `src` directly. Use this when you need to upload a set of files together as a single archive.
