[GH-ISSUE #7773] Feature: Support .ZIP for "uploads" #30411

Closed
opened 2026-04-25 04:37:23 -05:00 by GiteaMirror · 10 comments
Owner

Originally created by @spammenotinoz on GitHub (Dec 11, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/7773

Feature Request

Ability to upload .zip files into the chat.

Current Behavior requires extraction of zip file contents before they can be uploaded.

When attempted the error received is
File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/text.py", line 46, in lazy_load
detected_encodings = detect_file_encodings(self.file_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/helpers.py", line 50, in detect_file_encodings
raise RuntimeError(f"Could not detect encoding for {file_path}")
RuntimeError: Could not detect encoding for /app/backend/data/uploads/hshfsdfshdfdslfk_pure-support-guide.zip
ERROR [open_webui.apps.webui.routers.files] 400: Could not detect encoding for /app/backend/data/uploads/hshfsdfshdfdslf_pure-support-guide.zip

Originally created by @spammenotinoz on GitHub (Dec 11, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/7773 # Feature Request Ability to upload .zip files into the chat. Current Behavior requires extraction of zip file contents before they can be uploaded. When attempted the error received is File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/text.py", line 46, in lazy_load detected_encodings = detect_file_encodings(self.file_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/langchain_community/document_loaders/helpers.py", line 50, in detect_file_encodings raise RuntimeError(f"Could not detect encoding for {file_path}") RuntimeError: Could not detect encoding for /app/backend/data/uploads/hshfsdfshdfdslfk_pure-support-guide.zip ERROR [open_webui.apps.webui.routers.files] 400: Could not detect encoding for /app/backend/data/uploads/hshfsdfshdfdslf_pure-support-guide.zip
Author
Owner

@spammenotinoz commented on GitHub (Dec 16, 2024):

Hi silentoplayz, is this closed as NOT intended or closed due to it's already supported but a user error, as in I am doing something wrong.

<!-- gh-comment-id:2544571744 --> @spammenotinoz commented on GitHub (Dec 16, 2024): Hi [silentoplayz](https://github.com/silentoplayz), is this closed as NOT intended or closed due to it's already supported but a user error, as in I am doing something wrong.
Author
Owner

@spammenotinoz commented on GitHub (Dec 16, 2024):

Thank-you for taking the time to provide such a comprehensive response.

<!-- gh-comment-id:2546839637 --> @spammenotinoz commented on GitHub (Dec 16, 2024): Thank-you for taking the time to provide such a comprehensive response.
Author
Owner

@bnewddt commented on GitHub (Dec 29, 2024):

@slientoplayz

understood, but somehow we have to get rid of openai services

<!-- gh-comment-id:2564740241 --> @bnewddt commented on GitHub (Dec 29, 2024): @slientoplayz understood, but somehow we have to get rid of openai services
Author
Owner

@ldemailly commented on GitHub (Mar 6, 2025):

For the record this seems a bit strange... The whole idea is running locally... if I upload bad zip files, it's sort of my fault and I don't see how that's worse than fetching random URLs from the internet? it would be a lot more convenient than adding files one by one when for instance wanting to give a source tree as context

<!-- gh-comment-id:2702356069 --> @ldemailly commented on GitHub (Mar 6, 2025): For the record this seems a bit strange... The whole idea is running locally... if I upload bad zip files, it's sort of my fault and I don't see how that's worse than fetching random URLs from the internet? it would be a lot more convenient than adding files one by one when for instance wanting to give a source tree as context
Author
Owner

@Dibidydabs commented on GitHub (Mar 18, 2025):

This refusal makes no sense.
Just as Idemailly states, it is far more dangerous to scrape webpages.
You have exploitDB and other places that have active malware, droppers and other malicious code.
Github contains malicious code as well.

Also, if it was such a problem, why does almost every service out there accept them?

Not trying to ruffle feathers, but just pointing out that the excuse for not letting us be able to upload zips seems very arbitrary.

As for zip slip, that is an easy fix.
Every zip is in its only subfolder. No overwriting the files this way.
Also implementing a simple script to rename files of duplicates usually works quite well.

As for arbitrary code execution. That shouldn't happen unless their is specific code to try and install from a zip file. Or to execute scripts from a zip file. Just simply extracting and moving it to a folder should not allow arbitrary code.

For resource exhaustion. You can simply put a toggle to enable or disable the allowance of zip files for those that are in a production environment. You can also set a file size limit on the zip files. Then you could also set it to process in chunks/shards to reduce the resources needed.

Again, for malware content, that is an excuse.
As you should not be executing any code from an uploaded zip file.
This should be standard anyways.
If I upload a .sh file, does it execute the file or does it read the file?
If I upload a python file, does it just read the code or does it execute the code?

Is this not an option you can just turn on or off? I have a toggle to disable code execution.
It shouldn't be too hard to disable arbitrary code execution from an uploaded file.

<!-- gh-comment-id:2733858134 --> @Dibidydabs commented on GitHub (Mar 18, 2025): This refusal makes no sense. Just as Idemailly states, it is far more dangerous to scrape webpages. You have exploitDB and other places that have active malware, droppers and other malicious code. Github contains malicious code as well. Also, if it was such a problem, why does almost every service out there accept them? Not trying to ruffle feathers, but just pointing out that the excuse for not letting us be able to upload zips seems very arbitrary. As for zip slip, that is an easy fix. Every zip is in its only subfolder. No overwriting the files this way. Also implementing a simple script to rename files of duplicates usually works quite well. As for arbitrary code execution. That shouldn't happen unless their is specific code to try and install from a zip file. Or to execute scripts from a zip file. Just simply extracting and moving it to a folder should not allow arbitrary code. For resource exhaustion. You can simply put a toggle to enable or disable the allowance of zip files for those that are in a production environment. You can also set a file size limit on the zip files. Then you could also set it to process in chunks/shards to reduce the resources needed. Again, for malware content, that is an excuse. As you should not be executing any code from an uploaded zip file. This should be standard anyways. If I upload a .sh file, does it execute the file or does it read the file? If I upload a python file, does it just read the code or does it execute the code? Is this not an option you can just turn on or off? I have a toggle to disable code execution. It shouldn't be too hard to disable arbitrary code execution from an uploaded file.
Author
Owner

@GameBully2K commented on GitHub (Apr 18, 2025):

Maybe make it a feature that only runs on localhost with CORS policy since this would be beneficial for local developement

<!-- gh-comment-id:2815180926 --> @GameBully2K commented on GitHub (Apr 18, 2025): Maybe make it a feature that only runs on localhost with CORS policy since this would be beneficial for local developement
Author
Owner

@ifgreulich commented on GitHub (Jun 26, 2025):

I agree with @Dibidydabs, it's more a matter of careful implementation of zip file handling and can be implemented safely. Office file formats (e.g. docx or PDF, which is supported) are much more problematic. Even PDF can contain JavaScript...

Actually, not being able to upload archive files (at least zip) reduces the usability of a in my eyes well done UI considerably:

  • Unable to upload a number of coherent files make a model work on that.
  • Sometimes even the structure between files is important (e.g. code)

Maybe you (the team may rethink the denial of the feature request?

<!-- gh-comment-id:3008842069 --> @ifgreulich commented on GitHub (Jun 26, 2025): I agree with @Dibidydabs, it's more a matter of careful implementation of zip file handling and can be implemented safely. Office file formats (e.g. docx or PDF, which is supported) are much more problematic. Even PDF can contain JavaScript... Actually, not being able to upload archive files (at least zip) reduces the usability of a in my eyes well done UI considerably: - Unable to upload a number of coherent files make a model work on that. - Sometimes even the structure between files is important (e.g. code) Maybe you (the team may rethink the denial of the feature request?
Author
Owner

@Krashnicov commented on GitHub (Jul 9, 2025):

I feel there is a lot of this convo that I can't see, not sure why?

Either way, a reconsideration of this (I infer that it's closed due to not intended?) would be good and useful.

<!-- gh-comment-id:3052594468 --> @Krashnicov commented on GitHub (Jul 9, 2025): I feel there is a lot of this convo that I can't see, not sure why? Either way, a reconsideration of this (I infer that it's closed due to not intended?) would be good and useful.
Author
Owner

@BestBackwards commented on GitHub (Jul 30, 2025):

Per the above, I have raised another feature request for this as I believe this request was improperly handled by one of the contributors.

<!-- gh-comment-id:3136955135 --> @BestBackwards commented on GitHub (Jul 30, 2025): Per the above, I have raised another feature request for this as I believe this request was improperly handled by one of the contributors.
Author
Owner

@silentoplayz commented on GitHub (Jul 30, 2025):

Per the above, I have raised another feature request for this as I believe this request was improperly handled by one of the contributors.

This issue was handled with security of our users in mind. I could've very easily closed it as "not planned". Anyways, I'll try to remain respectful of other people's perspectives and will let the actual maintainer handle the new issue post as he wishes. I'm no longer taking part of this discussion.

<!-- gh-comment-id:3137187684 --> @silentoplayz commented on GitHub (Jul 30, 2025): > Per the above, I have raised another feature request for this as I believe this request was improperly handled by one of the contributors. This issue was handled with security of our users in mind. I could've very easily closed it as "not planned". Anyways, I'll try to remain respectful of other people's perspectives and will let the actual maintainer handle the new issue post as he wishes. I'm no longer taking part of this discussion.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#30411