https://retellai.com/?utm_source=discord&utm_medium=seo logo
"I am sometimes getting error in adding a file to ...
# ❓・ai-evy-support
m
@AI Evy "I am sometimes getting error in adding a file to my knowledge base. once i tried to add a pdf of around 19Mb the file was added successfully but when i added a csv file of same size i encountered an error."
a
Thanks for tagging me @Meet_CH. I'll look through relevant sources and get back to you shortly.
### Answer The file size limit for knowledge base uploads is 50MB per file, with a maximum of 25 files per upload [(1) ]() . Since both your PDF and CSV are 19MB, they're within the size limit. Based on community reports, there have been documented issues with knowledge base file uploads [(2) ]() [(3) ]() [(4) ]() . Some users experienced files getting stuck at "in progress" status [(2) ]() , while others encountered "Internal Server Error" when uploading files through the API [(3) ]() [(4) ]() . Troubleshooting steps to try: 1. Use the correct file format - File format issues have caused problems before. One user found that files with incorrect extensions (like XML files saved as .md) caused processing failures [(5) ]() . 2. Try uploading through different methods - If you're using the dashboard, try the API (or vice versa) . Here's the API approach using the Retell SDK:
Copy code
javascript
import Retell from 'retell-sdk';
import fs from 'fs';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
async function main() {
 const knowledgeBaseResponse = await client.knowledgeBase.addSources(
 "knowledge_base_xxxxxxxxxxxx",
 {
 knowledge_base_files: [
 fs.createReadStream("./sample.txt") ,
 ],
 }
 ) ;
 console.log(knowledgeBaseResponse.knowledge_base_id) ;
}
main() ;
​ To learn more, see the sources I considered: [[1] Add Knowledge Base Sources](https://docs.retellai.com/api-references/add-knowledge-base-sources) [[2] Knowledge base uploads stuck at "In progress"](https://community.retellai.com/t/knowledge-base-uploads-stuck-at-in-progress/368) [[3] Major Issue with KB](https://community.retellai.com/t/major-issue-with-kb/228) [[4] Knowledge Base Issues](https://discord.com/channels/1186424376300679209/1309471075733868574) [[5] Knowledge base bug](https://discord.com/channels/1186424376300679209/1395139321622958160) ​
[(1) ]() 3. Split into smaller files - Try creating separate knowledge bases with fewer files each [(2) ]() . 4. Check browser compatibility - Some users reported issues with Safari and other browsers, but Chrome worked correctly [(4) ]() . If the issue persists, contact Retell AI support with your workspace ID and knowledge base ID so they can investigate the backend processing: * [Contact Sales]() * [Discord]() * [GitHub]() **
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.