# uip solution upload

> Syntax and options for `uip solution upload`, which bundles a local solution and sends it to Studio Web for browser-based editing.

`uip solution upload` uploads a local solution to **UiPath Studio Web** for browser-based editing. It bundles the solution into an internal `.uis` archive, sends it to Studio Web, and (on success) prints a URL you can open directly in the designer.

Unlike [`uip solution pack`](./uip-solution-pack.md) + [`uip solution publish`](./uip-solution-publish.md), which produce a deployable `.zip` for Orchestrator, `upload` targets the interactive **Studio Web** authoring surface. Use this when you want to continue editing a solution collaboratively in the browser.

## Overwrite or import

Before uploading, the command checks whether Studio Web holds a solution with the `SolutionId` from the `.uipx` (or from the `.uis` archive):

- **The solution exists.** It is overwritten in place. The replaced contents are first recorded as a restorable version, unless you pass `--no-snapshot`. `Data.Action` is `Overwritten`.
- **The solution does not exist.** The upload is imported as a new solution, and the ID that Studio Web assigns is written back into the local `.uipx` so the next upload overwrites the same solution. `Data.Action` is `Imported`.

`--force` skips the existence check and overwrites directly. If Studio Web has no solution with that `SolutionId`, the command fails with `not_found` and uploads nothing; re-run without `--force` to import as new.

## Synopsis

```
uip solution upload <solutionPath> [--force] [--no-snapshot] [--login-validity <minutes>]
```

The command honours the [global options](./global-options.md) and returns the [standard exit codes](./exit-codes.md).

## Arguments

- `<solutionPath>` *(required)* — One of:
  - A **solution directory** containing a `.uipx` manifest (most common).
  - A **`.uipx` file** (the command resolves the directory containing it).
  - A **`.uis` file** (a pre-bundled solution archive; uploaded as-is for backward compatibility).

## Options

- `--force` — Skip the existence check and overwrite the Studio Web solution named by the bundled `SolutionId` directly. An upload overwrites an existing cloud solution without it. Fails if that solution does not exist. No effect when no `SolutionId` is bundled (a `.uis` archive without one): the upload imports as new.
- `--no-snapshot` — Do not record a restorable pre-overwrite version of the cloud solution before replacing its contents. Changes made in Studio Web since the last upload are lost; local files are unaffected. No effect when the upload imports a new solution.
- `--login-validity <minutes>` — Minimum minutes before token expiration to trigger a refresh. Defaults to `10`.

## Examples

### Minimal

```bash
uip solution upload ./my-solution
```

### Upload a specific .uipx

```bash
uip solution upload ./workspace/my-solution/my-solution.uipx
```

### Overwrite without a restorable snapshot

```bash
uip solution upload ./my-solution --no-snapshot
```

### Scripting — open the returned designer URL

```bash
URL=$(uip solution upload ./my-solution --output-filter "DesignerUrl" --output plain)
open "$URL"   # macOS
```

## Data shape (--output json)

Studio Web has no solution with the bundled `SolutionId`, so it's imported as new and the local `.uipx` is updated with the assigned id:

```json
{
  "Code": "SolutionUpload",
  "Data": {
    "Status": "Uploaded successfully",
    "Action": "Imported",
    "SolutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "DesignerUrl": "https://cloud.uipath.com/myorg/mytenant/studio_/designer/p1?solutionId=a1b2c3d4-0000-0000-0000-000000000001",
    "LocalSolutionIdUpdated": {
      "Path": "/workspace/my-solution/my-solution.uipx",
      "From": "00000000-0000-0000-0000-0000000000ff",
      "To": "a1b2c3d4-0000-0000-0000-000000000001"
    },
    "Response": { }
  }
}
```

The solution already exists on Studio Web, so it's overwritten in place, with the replaced contents recorded first as a restorable version:

```json
{
  "Code": "SolutionUpload",
  "Data": {
    "Status": "Uploaded successfully",
    "Action": "Overwritten",
    "SolutionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "DesignerUrl": "https://cloud.uipath.com/myorg/mytenant/studio_/designer/p1?solutionId=a1b2c3d4-0000-0000-0000-000000000001",
    "SnapshotCreated": true,
    "Response": { }
  }
}
```

- `Action` — `"Imported"` on a first upload, `"Overwritten"` when a solution with that `SolutionId` already existed on Studio Web.
- `SolutionId` — the identity Studio Web assigned (on first upload) or matched (on overwrite). Also written back into the local `.uipx` so the next `upload` updates the same solution.
- `DesignerUrl` — ready-to-open URL for the first project in the solution, pre-scoped to the solution. `null`/absent when Studio Web does not return a project ID.
- `LocalSolutionIdUpdated` — present only when a fresh `SolutionId` was written back into the local `.uipx` (`Path`, `From`, `To`). Absent when overwriting in place, or when the upload source had no prior id to rewrite.
- `SnapshotCreated` — present and `true` only on an overwrite that recorded a restorable pre-overwrite version (that is, without `--no-snapshot`). Absent on a fresh import and with `--no-snapshot`.
- `Response` — raw Studio Web response payload. Useful for debugging; not part of a stable contract.

## Side effects

- **Resource preparation.** For a solution directory or `.uipx` file, `upload` prepares the solution's resources the same way as [`uip solution pack`](./uip-solution-pack.md): it syncs each project's `bindings_v2.json` into the solution's resource declarations, as [`uip solution resources refresh`](./uip-solution-resources.md#refresh) does, and writes what each project contributes onto its resources. An error that a project's tool reports fails the upload. A `.uis` file is uploaded as-is, without this step.
- **SolutionId write-back.** On an import, the returned solution ID replaces (or populates) the `SolutionId` field in the local `.uipx`.

## Files left out of the bundle

When bundling a solution directory, `upload` always leaves out `.venv`, `node_modules`, `__pycache__`, `.git`, `.local`, and `.flow-sdk` folders, and dotenv files (`.env`, `.env.local`, `.env.production`, and similar).

To leave out more files, add a `.uipignore` file at the solution root, in a project folder, or both. The syntax is gitignore: one pattern per line, `#` for comments, globs such as `*.log`, anchored paths such as `/dist`, a trailing `/` for directories only, and `!` to re-include. Patterns in a project's `.uipignore` match relative to that project folder and apply only to it. An unreadable `.uipignore` is skipped with a warning.

A pattern that would leave out the manifest of a project listed in the `.uipx` (for example `*.uiproj`, or the project's folder name) is refused: the command fails with `invalid_argument` and names the project. Remove or narrow the pattern, or remove the project from the solution with [`uip solution projects remove`](./uip-solution-projects.md), then upload again.

## Failure modes

- **A project uses a `project.json` manifest that Studio Web does not accept.** Refused with `invalid_argument`. Convert the listed project to a `project.uiproj` manifest before uploading. `uip solution pack` and `uip solution publish` accept `project.json`.
- **A `.uipignore` pattern drops a listed project.** Refused with `invalid_argument`, as described in [Files left out of the bundle](#files-left-out-of-the-bundle).
- **A project file has a name that Studio Web does not accept.** A file inside a project folder whose name holds a control character or any of `: * ? " < > |` is refused with `invalid_argument` before anything is uploaded, and the message names the files. Rename the files, or leave them out with a `.uipignore` pattern, then upload again. Folder names are not checked, and files that `.uipignore` leaves out are not checked. A `.uis` file is uploaded as it is, without this check. When Studio Web refuses such a name on an overwrite, the command fails with `invalid_argument` and `Retry: RetryWillNotFix`.
- **`--force` with a `SolutionId` that Studio Web does not hold.** Refused with `not_found`; nothing is uploaded.

## Related commands

- [`uip solution pack`](./uip-solution-pack.md) + [`uip solution publish`](./uip-solution-publish.md) — deployment pipeline alternative to `upload`.
- [`uip solution delete`](./uip-solution-delete.md) — remove a Studio Web solution by its `SolutionId`.
- [`uip solution init`](./uip-solution-init.md) — scaffold a solution before uploading.

## See also

- [Authentication](./authentication.md) — `upload` requires an active session.
- [`uip solution` overview](./uip-solution.md).
