Manage files
Each Langflow server has a file management system where you can store files that you want to use in your flows.
Files uploaded to Langflow file management are stored locally to your Langflow server, and they are available to all of your flows.
Uploading files to Langflow file management keeps your files in a central location, and allows you to reuse files across flows without repeated manual uploads.
Use the file management UI
You can use the file management UI to upload files from your local machine to your own Langflow server. You can also manage all files that have been uploaded to your Langflow server.
-
Navigate to Langflow file management:
- In Langflow, on the Projects page page, click My Files below the list of projects.
- From a browser, navigate to your Langflow server's
/files
endpoint, such ashttp://localhost:7860/files
. Modify the base URL as needed for your Langflow server. - For programmatic file management, use the Langflow API files endpoints. However, the following steps assume you're using the file management UI.
-
On the My Files page, click Upload.
-
Select one or more files to upload.
After uploading files, you can rename, download, copy, or delete files within the file management UI:
-
To delete a file, hover over a file's icon, select it, and then click Delete. You can delete multiple files in a single action.
-
To download a file, hover over a file's icon, select it, and then click Download. If you download multiple files in a single action, they are saved together in a zip file.
Upload and manage files with the Langflow API
With the Langflow API, you can upload and manage files in Langflow file management, and you can send files to flows programmatically at runtime.
For more information and examples, see Files endpoints and Create a chatbot that can ingest files.
Use files in a flow
To use files in your Langflow file management system in a flow, add a component that accepts file input to your flow, such as the File component.
For example, add a File component to your flow, click Select files, and then select files from the My Files list.
This list includes all files in your server's file management system, but you can only select file types that are supported by the File component. If you need another file type, you must use a different component that supports that file type, or you need to convert it to a supported type before uploading it.
For more information about the File component and other data loading components, see Data components.
Load files at runtime
You can use preloaded files in your flows, and you can load files at runtime, if your flow accepts file input. For an example, see Create a chatbot that can ingest files.
Upload images
Langflow supports base64 images in the following formats:
- PNG
- JPG/JPEG
- GIF
- BMP
- WebP
You can upload images to the Playground chat interface and as runtime input with the Langflow API.
-
In the Playground, you can drag-and-drop images into the chat input area, or you can click the Attach image icon to select an image to upload.
-
When you trigger a flow with the
/api/v1/run/$FLOW_ID
endpoint, you can use thefiles
parameter to attach image data as a base64-encoded string:_10curl -X POST "http://$LANGFLOW_SERVER_ADDRESS/api/v1/run/$FLOW_ID" \_10-H "Content-Type: application/json" \_10-H "x-api-key: $LANGFLOW_API_KEY" \_10-d '{_10"session_id": "custom_session_123",_10"input_value": "What is in this image?",_10"input_type": "chat",_10"output_type": "chat",_10"files": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."]_10}'
For more specialized image processing, browse third-party bundles or create your own components.
Work with video files
For videos, see the Twelve Labs and YouTube bundles in the Langflow Components menu.
Set the maximum file size
By default, the maximum file size is 100 MB.
To modify this value, change the --max-file-size-upload
environment variable.