> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-delivery/use-continuous-delivery/cd-building-blocks/services/harness-file-store-faqs.md).

# FAQ — Harness File Store

Answers to common questions about the Harness File Store

This topic answers common questions about uploading, referencing, and sharing files with the Harness File Store. Go to [Add inline service files using File Store](/continuous-delivery/use-continuous-delivery/cd-building-blocks/services/add-inline-manifests-using-file-store.md) to store and reference manifests and config files in Continuous Delivery.

***

## Upload and API usage

These questions cover creating and updating File Store content through the API and pipeline scripts.

<details>

<summary>How can I upload a file to a specific folder in the Harness File Store from a pipeline stage using a PowerShell script?</summary>

Invoke the Harness File Store API from PowerShell in a Shell Script step (or similar) to create the file in the target folder. Go to the [File Store create API](https://apidocs.harness.io/tag/File-Store#operation/create) to review the request shape and parameters.

</details>

<details>

<summary>How do I write to the File Store?</summary>

Use the File Store API to create or update files. Go to the [File Store update API](https://apidocs.harness.io/tag/File-Store#operation/update) to create or change file content.

</details>

<details>

<summary>How do I properly pass tag inputs in an API call for the Harness File Store?</summary>

File Store tags are key-value pairs. Pass them as a JSON array of objects. For example:

```
tags=[{"key":"tag","value":"value"}]
```

</details>

<details>

<summary>What pattern should I use for the scopedFilePath parameter in the File Store API?</summary>

The `scopedFilePath` value depends on the file scope:

* **Project:** `scopedFilePath = /path/to/file`
* **Organization:** `scopedFilePath = org:/path/to/file`
* **Account:** `scopedFilePath = account:/path/to/file`

Encode `/path/to/file` as `%2Fpath%2Fto%2Ffile` in the URL. Populate query arguments for `accountIdentifier`, `orgIdentifier`, and `projectIdentifier` to match where the file is stored. Go to the [get file content by scoped path API](https://apidocs.harness.io/tag/File-Store#operation/getFileContentUsingScopedFilePath) for the full parameter list.

</details>

***

## Read and reference files

These questions cover reading File Store content in pipelines and using it as overrides or expressions.

<details>

<summary>Can I access a File Store entry as a file on disk?</summary>

You can read File Store content as a string with `<+fileStore.getAsString("filename")>`. To use it as a file on disk, write the expression output to a file in the step, then use that path:

```bash
cat >> filename.txt << EOF
<+fileStore.getAsString("filenameInHarnessFileStore")>
EOF
```

</details>

<details>

<summary>Is the expression &#x3C;+configFile.getAsBase64("myFile")> supported only for service config files, not for any File Store file?</summary>

Yes. That expression works for config files added to the service. It does not apply to an arbitrary File Store file outside that service config. Go to [Add inline service files using File Store](/continuous-delivery/use-continuous-delivery/cd-building-blocks/services/add-inline-manifests-using-file-store.md#reference-files-in-the-file-store-using-an-expression) to review supported expressions.

</details>

<details>

<summary>Is there an inline values override?</summary>

There is no separate inline values YAML override option. You can store a values YAML override in the Harness File Store and add it in the values override configuration for the service or manifest.

</details>

<details>

<summary>How can I add a runtime-generated override file to a service before Helm rendering?</summary>

Values file resolution runs when the deployment step runs. Add a values.yaml override from the File Store (or another source repository) in the manifest, and update that values.yaml through the API or CLI with dynamic information. You can also place output variable expressions directly in the values.yaml file; Harness resolves them when it fetches the file. Ensure the steps that produce those output variables run before the deployment step.

</details>

***

## Share files across stages and pipelines

These questions cover moving file content between stages, pipelines, and projects.

<details>

<summary>Is there a way to generate a dynamic file in one pipeline stage and consume it in a different stage?</summary>

For Continuous Integration, go to [Share Continuous Integration data across steps and stages](https://developer.harness.io/docs/continuous-integration/use-harness-ci/use-harness-ci/caching-ci-data/share-ci-data-across-steps-and-stages) to review caching and sharing options.

For Continuous Delivery, use the File Store API to create a file, then reference it in a later stage. Go to the [File Store list API](https://apidocs.harness.io/tag/File-Store#operation/listFilesAndFolders) to list and fetch files. Alternatively, write a file on the delegate host and run the later stage on the same delegate.

</details>

<details>

<summary>How do I share files between Continuous Delivery stages?</summary>

Use the File Store API to create a file in one stage and reference it in another. Go to the [File Store list API](https://apidocs.harness.io/tag/File-Store#operation/listFilesAndFolders) to list and fetch files. Alternatively, write a file on the delegate and use the same delegate for the later stage.

</details>

<details>

<summary>How do I pass values from Continuous Integration console logs in Pipeline A to a Continuous Delivery stage in Pipeline B?</summary>

Store the first pipeline's output (for example, in the File Store or in Git), then pull that content in Pipeline B. Harness does not provide a built-in variable that passes console output directly across separate pipelines.

</details>

<details>

<summary>Is there a way to use one YAML file stored in a Git repo in two different projects?</summary>

A pipeline YAML includes unique project and organization identifiers, so you cannot reuse the same pipeline YAML unchanged across projects. Create a pipeline-level template at the account level and use that template in each project.

</details>

***

## Limits and script storage

These questions cover size limits and where shell script or config content can live.

<details>

<summary>How do I store large dump files (about 3 GB to 5 GB) in the Harness File Store?</summary>

If a dump file is between about 3 GB and 5 GB, split it into multiple files before you upload them to the Harness File Store.

</details>

<details>

<summary>When I store a shell script in the Harness File Store, why do I not see Bitbucket or GitHub as options?</summary>

For the shell script provisioner script source, Harness supports **Inline** and **Harness File Store** only. Bitbucket and GitHub are not options for that selector.

</details>

<details>

<summary>Can I store a config file required by a CLI tool in Harness instead of on the delegate, and reference it from a custom shell script?</summary>

Yes. Use the File Store API to create or fetch the file from the Harness File Store inside your shell script. Go to the [File Store list API](https://apidocs.harness.io/tag/File-Store#operation/listFilesAndFolders) to list and retrieve files.

</details>

{% @harness-feedback/feedback %}
