Upload files
An upload source holds files you add from your computer: documents, PDFs, Word, Excel and PowerPoint files, notes and code. It needs no other system, so it suits any team whose knowledge lives in files, such as policies, contracts, runbooks, reports and handbooks.
What you can upload
| Kind | Examples | Largest file |
|---|---|---|
| Text, Markdown and code | .md, .txt, .html, .csv, .json, .yaml, .sql, .py, .ts, .go, .java, and names such as Dockerfile, Makefile and README | 1 MB (1,000,000 bytes; the console shows 977 KB) |
.pdf | 50 MB | |
| Word, Excel and PowerPoint | .docx, .xlsx, .pptx | 50 MB |
One upload source holds up to 2 GB and 20,000 files. For the full list of limits, see Limits & defaults.
Workstate indexes the text of PDF and Office files. A scanned PDF with no text layer has no text to index. The older .doc, .xls and .ppt formats are not supported: save them as .docx, .xlsx or .pptx first.
Code files go into the code corpus. Everything else, including PDF and Office files, goes into the wiki corpus.
What Workstate refuses
- Hidden files and folders, whose names start with a dot, such as
.envand.git - Types not in the table above, including images, archives, and key and certificate files such as
.pemand.key - Empty files, and text files that are not UTF-8
- Files whose content does not match their name, such as a
.pdfthat is not a PDF, or an old.docfile renamed to.docx - Files over the size limit, and files that would take the source past 2 GB or 20,000 files
- Paths longer than 512 bytes, file or folder names longer than 255 bytes, and paths more than 16 levels deep, counting the file itself
Before it sends anything, the console also holds back hidden folders and dependency folders such as node_modules and __pycache__.
Workstate does not check file contents for secrets
Key files and .env files are refused by their name and type. A password or key written inside an accepted file, such as a .txt or .md file, is indexed, and everyone who can reach the namespace can find it. Check files before you upload them.
What you need
- The owner or admin role. Members can see an upload source's files, but cannot upload or delete them.
- The namespace for the files, selected in the switcher at the top of the sidebar.
Create an upload source
Open Sources. Under Add a source, select Upload files.
In Name, type a name, for example "Team handbook". The name is also the repository name in search, in lower case with hyphens for spaces:
team-handbook.Decide whether to select Each top-level folder is a repository:
- Leave it cleared for one collection of files, such as a handbook or a set of policies. Every file is searchable under the source's name.
- Select it for a set of project folders. Each top-level folder becomes a repository of its own, named after the folder, so an agent can search one project at a time.
You cannot change this choice after you create the source.
Select Create source. The source's page opens.
Upload files
- On the source's page, in Upload, drop files or folders onto the area that says "Drop files or folders here". Or select Choose files or Choose a folder.
- Check the summary: how many files are ready, and how many are held back and why.
- Select Upload. Large uploads go in batches, with progress shown. To stop, select Cancel.
The panel then says how many files it stored, and lists any it refused, with the reason for each. Each upload starts a sync, which appears under Sync history.
A file uploaded to a path that already holds a file replaces it. To update a document, upload the new version under the same name, in the same folder.
With Each top-level folder is a repository selected, each folder you drop becomes a repository. Choose a folder makes a repository of each folder inside the folder you choose. Files outside any folder go under the source's own name. Without that option, folders keep their structure under the source's name.
Delete a file
- In Files, find the file. To narrow a long list, type part of its path in Filter by path.
- Select the trash icon (Delete this file), then select it again, where it now says Delete?, to confirm.
Workstate deletes the file and starts a sync, which removes it from search.
Keep uploads up to date
An upload source changes only when someone uploads or deletes files, and each change starts a sync. Nothing updates it from anywhere else, so upload a new version whenever a document changes. An agent's reindex_corpus skips upload sources.
Check it worked
- Files lists your files, with each file's type, size and when it was uploaded, and the total used out of 2 GB.
- The status moves to Up to date, and Sync history shows the sync as Succeeded.
- The page says which repository the files are searchable as, for example "Searchable as repository team-handbook — in an agent,
search_corpus(repo: "team-handbook")". - Open Search and search for something you know is in one of the files.
Troubleshooting
| What you see | What to do |
|---|---|
| "…: not a supported type — text, code, Markdown, PDF, Word, Excel or PowerPoint" | Convert the file to a supported type, such as PDF or .docx. |
| "hidden files and folders are not indexed (…)" | Rename the file or folder so its name does not start with a dot, if it should be searchable. |
| "not a UTF-8 text file" | Save the file as UTF-8 text, or as PDF. |
| "not an Office Open XML document (.docx, .xlsx, .pptx)" | Open the file in its app and save it in the newer format. |
| "larger than the … allowed for this file" | Split the file, or save it as a PDF, which can be up to 50 MB. |
| "the source already holds 20000 files" | Delete files you no longer need, or create another upload source. |
| Sync history notes "… has no text to index (a scan without a text layer?)" | The PDF is probably a scan. Run text recognition (OCR) on it, then upload it again. |
| Sync history notes "Could not read …" | Workstate could not extract text from the file. Save it again, or save it as PDF, and upload it again. |