DeepsetFileUploader
Upload files from your pipeline to Haystack Platform temporary file storage and return stable references (file_id and file_name) you can expose as pipeline output, so people can download those files from the product.
Think of the component as a handoff step: your pipeline or another component already has files, for example a generated spreadsheet or a chart saved to disk. Those files live on the worker where the pipeline ran. DeepsetFileUploader copies them to the platform and gives back IDs the UI and APIs understand, so the same run can offer downloadable attachments instead of only text.
Key Features
- Uploads files to Haystack Platform temporary file storage during a pipeline run.
- Returns stable
file_idandfile_namereferences for each uploaded file. - Supports local file paths,
Pathobjects, and in-memoryByteStreamobjects. - Exposes uploaded files as downloadable attachments in Playground, jobs, and integrated apps.
- Requires no init parameters — all settings use environment variables.
Configuration
Before using DeepsetFileUploader, create the following secrets in the Haystack Platform workspace or organization:
DEEPSET_API_URL: The base URL of the deepset API. Set it tohttps://api.cloud.deepset.ai.DEEPSET_API_KEY: The API key to connect to your Haystack Platform workspace or organization. For details, see Generate API Keys.
Optionally, set the workspace name in the DEEPSET_WORKSPACE secret. If omitted, the component uses default.
For instructions on creating secrets, see Add Secrets.
-
Drag the
DeepsetFileUploadercomponent onto the canvas from the Component Library. -
Click on the component to open the configuration panel.
-
The component has no configuration options in Pipeline Builder. All settings come from the environment variables listed above.
-
Drag the
DeepsetFileUploadercomponent onto the canvas from the Component Library. -
Click the component to open the configuration panel.
-
The component has no parameters to configure in the panel. Authentication and workspace selection use the environment variables above.
Connections
DeepsetFileUploader receives files from any component that produces a list of strings, paths, or ByteStream objects.
Connect its files output to the Output component so users can download the uploaded files from the platform.
Usage Examples
Basic Configuration
file_uploader:
type: deepset_cloud_custom_nodes.utils.deepset_file_uploader.DeepsetFileUploader
init_parameters: {}
Basic DeepsetFileUploader Configuration
This is the basic component configuration. The component has no parameters, so you just specify the component type and leave the init parameters empty.
components:
file_uploader:
type: deepset_cloud_custom_nodes.utils.deepset_file_uploader.DeepsetFileUploader
init_parameters: {}
Pipeline Where Another Component Creates Files
This is an example of a pipeline where a custom component writes files to disk and exposes a list of paths that should become downloads.
components:
report_exporter:
type: my_org.custom_nodes.report_exporter.ReportExporter
init_parameters:
output_format: csv
file_uploader:
type: deepset_cloud_custom_nodes.utils.deepset_file_uploader.DeepsetFileUploader
init_parameters: {}
connections:
- sender: report_exporter.saved_paths
receiver: file_uploader.files
inputs:
query:
- "report_exporter.query"
outputs:
attachments: "file_uploader.files"
max_runs_per_component: 100
metadata: {}
ReportExporter is an example component that must output saved_paths as a list of strings (or paths). The pipeline output key attachments maps to the uploader's files list so the platform can treat them as downloadable file references.
Pipeline Where Files Are Supplied at Query Time
This is an example of a pipeline where files are supplied at query time. Users upload files to be translated and the pipeline returns the translated files. Note that the Input component is configured to accept files and query inputs, and the Output component is configured to output output_files and messages.
components:
file_uploader:
type: deepset_cloud_custom_nodes.utils.deepset_file_uploader.DeepsetFileUploader
init_parameters: {}
LLM:
type: haystack.components.generators.chat.llm.LLM
init_parameters:
chat_generator:
init_parameters:
model: gpt-5.4
type: haystack.components.generators.chat.openai_responses.OpenAIResponsesChatGenerator
system_prompt: |-
{% message role="system" %}
You are a professional translator that translates files.
{% endmessage %}
user_prompt: |-
{% message role="user" %}
Translate the following {{ files }} into English.
{% endmessage %}
required_variables: "*"
streaming_callback:
connections: []
max_runs_per_component: 100
metadata: {}
inputs:
files:
- file_uploader.files
- LLM.files
query:
- LLM.messages
outputs:
output_files: file_uploader.files
messages: LLM.messages
Wire your client or Playground input schema so the pipeline receives a files value compatible with the uploader (paths or ByteStream-like payloads your platform sends).
Parameters
Inputs
| Parameter | Type | Description |
|---|---|---|
files | List[Union[str, Path, ByteStream]] | Files to upload: local paths or in-memory streams. For paths, the file name is taken from the path. For ByteStream, set file_name in meta. |
Outputs
| Parameter | Type | Description |
|---|---|---|
files | List[Dict[str, str]] | One entry per uploaded file: file_id (platform ID) and file_name (original name). |
Init Parameters
DeepsetFileUploader has no init parameters. Authentication and workspace selection use environment variables only.
Run Method Parameters
These are the parameters you can configure for the component's run() method. This means you can pass these parameters at query time through the API, in Playground, or when running a job. For details, see Modify Pipeline Parameters at Query Time.
| Parameter | Type | Default | Description |
|---|---|---|---|
files | List[Union[str, Path, ByteStream]] | Files to upload: paths or streams. For ByteStream, set file_name in meta. |
Was this page helpful?