Increasing the limits on simultaneous file uploads #10090
sethchandler
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I don't like the limit of 10 files at a time on upload and I am not clear why it exists (I will probably find out!). So, with the help of Claude.ai and a lot of spelunking, we developed a way to increase the limit. Here is what seems to work. If anyone is aware of (a) a better way or (b) why this is a really bad idea, let me know! I do have a reverser script, which I include at the bottom.
How to Increase LibreChat File Upload Limit from 10 to 100+ Files
Prerequisites
Step-by-Step Instructions
1. Create Backups (Safety First!)
cd /path/to/LibreChat cp docker-compose.override.yml docker-compose.override.yml.backup cp ./packages/data-provider/src/file-config.ts ./packages/data-provider/src/file-config.ts.backup
2. Modify the File Limit
Edit the configuration file:
Find these two lines (around lines 190 and 203):
Change both to your desired limit:
Save and exit (Ctrl+X, then Y, then Enter in nano).
3. Verify the Change
grep "fileLimit:" ./packages/data-provider/src/file-config.ts
You should see:
4. Configure Docker to Build from Source
Create or update
docker-compose.override.yml
:Note: If you already have a
docker-compose.override.yml
with other customizations, add theimage: null
andbuild:
section to your existingapi:
service config.5. Rebuild and Restart LibreChat
This will take 5-10 minutes as it builds from source.
6. Clear Browser Cache
In your browser:
Cmd+Shift+R
(Mac) orCtrl+Shift+R
(Windows/Linux)7. Test It!
Try uploading more than 10 files. You should now be able to upload up to 100 files at once.
Troubleshooting
If Something Goes Wrong
Restore your original setup:
If Upload Limit Still Shows 10
Should show
fileLimit:100
Should NOT show
ghcr.io/danny-avila/librechat-dev:latest
if building from sourceWhat This Changes
Alternative: Different Limit per Endpoint
If you want different limits for different endpoints, edit
file-config.ts
:Reverser Procedure
cat > restore-librechat.sh << 'EOF'
#!/bin/bash
echo "Restoring LibreChat to original state..."
cp docker-compose.override.yml.backup docker-compose.override.yml
docker compose down
docker compose pull
docker compose up -d
echo "LibreChat restored! Check http://localhost:3080"
EOF
chmod +x restore-librechat.sh
and then just ...
./restore-librechat.sh
Beta Was this translation helpful? Give feedback.
All reactions