Knowledge Question. When I change High Quality,File upload status is Error! #933

Closed
opened 2026-02-21 17:29:06 -05:00 by yindo · 1 comment
Owner

Originally created by @blackstar239 on GitHub (Jan 19, 2024).

Originally assigned to: @JohnJyong on GitHub.

Self Checks

Provide a description of the help you need

version : 0.4.8
install : docker deployment.
20240119161834
w20240119161920

Originally created by @blackstar239 on GitHub (Jan 19, 2024). Originally assigned to: @JohnJyong on GitHub. ### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). ### Provide a description of the help you need version : 0.4.8 install : docker deployment. ![20240119161834](https://github.com/langgenius/dify/assets/58406258/2e8204ea-f030-479d-91dc-b2468083419a) ![w20240119161920](https://github.com/langgenius/dify/assets/58406258/17242727-ba65-43e3-b3db-4aa04f994a31)
yindo added the 🐞 bug label 2026-02-21 17:29:06 -05:00
yindo closed this issue 2026-02-21 17:29:06 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 19, 2024):

🤖

Hello again @blackstar239! Great to see you're diving deeper into dify. Let's figure this out together.

Based on the information you've provided, the error you're experiencing when you switch to High Quality and attempt to upload a file could be due to several reasons. Here are some possibilities:

  1. File Size Limit: The file you're trying to upload might exceed the file size limit defined in the application configuration. If the file size is larger than this limit, a FileTooLargeError will be raised. You can check this in the application's configuration using the keys "UPLOAD_IMAGE_FILE_SIZE_LIMIT" and "UPLOAD_FILE_SIZE_LIMIT". These values are multiplied by 1024 twice to convert the limit from megabytes to bytes. Here is the relevant code:
if extension.lower() in IMAGE_EXTENSIONS:
    file_size_limit = current_app.config.get("UPLOAD_IMAGE_FILE_SIZE_LIMIT") * 1024 * 1024
else:
    file_size_limit = current_app.config.get("UPLOAD_FILE_SIZE_LIMIT") * 1024 * 1024

You can find this in the file_service.py file.

  1. Unsupported File Type: The file type you're trying to upload might not be supported. The application supports a specific set of file extensions defined in the FileSupportTypeApi class. If the file type is not in this list, an UnsupportedFileTypeError will be raised.

  2. No File Uploaded: If no file is included in the request, a NoFileUploadedError will be raised.

  3. Too Many Files: If more than one file is included in the request, a TooManyFilesError will be raised.

Without more specific information about the error message you're receiving, it's difficult to pinpoint the exact cause. Please check the error message you're receiving and compare it with the possible causes listed above. You can find more details in the file.py file.

If the error message being displayed when you attempt to upload a file in High Quality mode is: "Current operation only supports 'high-quality' datasets.", this is indicated in the class HighQualityDatasetOnlyError in the provided Python code:

class HighQualityDatasetOnlyError(BaseHTTPException):
    error_code = 'high_quality_dataset_only'
    description = "Current operation only supports 'high-quality' datasets."
    code = 400

You can find this in the error.py file.

I hope this helps! If you need further assistance, please provide more details about the error message you're receiving.

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot[bot] commented on GitHub (Jan 19, 2024): _🤖_ <!-- Greeting --> Hello again @blackstar239! Great to see you're diving deeper into dify. Let's figure this out together. <!-- Answer --> Based on the information you've provided, the error you're experiencing when you switch to High Quality and attempt to upload a file could be due to several reasons. Here are some possibilities: 1. **File Size Limit**: The file you're trying to upload might exceed the file size limit defined in the application configuration. If the file size is larger than this limit, a `FileTooLargeError` will be raised. You can check this in the application's configuration using the keys "UPLOAD_IMAGE_FILE_SIZE_LIMIT" and "UPLOAD_FILE_SIZE_LIMIT". These values are multiplied by 1024 twice to convert the limit from megabytes to bytes. Here is the relevant code: ```py if extension.lower() in IMAGE_EXTENSIONS: file_size_limit = current_app.config.get("UPLOAD_IMAGE_FILE_SIZE_LIMIT") * 1024 * 1024 else: file_size_limit = current_app.config.get("UPLOAD_FILE_SIZE_LIMIT") * 1024 * 1024 ``` You can find this in the [file_service.py](https://github.com/langgenius/dify/blob/main/api/services/file_service.py) file. 2. **Unsupported File Type**: The file type you're trying to upload might not be supported. The application supports a specific set of file extensions defined in the `FileSupportTypeApi` class. If the file type is not in this list, an `UnsupportedFileTypeError` will be raised. 3. **No File Uploaded**: If no file is included in the request, a `NoFileUploadedError` will be raised. 4. **Too Many Files**: If more than one file is included in the request, a `TooManyFilesError` will be raised. Without more specific information about the error message you're receiving, it's difficult to pinpoint the exact cause. Please check the error message you're receiving and compare it with the possible causes listed above. You can find more details in the [file.py](https://github.com/langgenius/dify/blob/main/api/controllers/console/datasets/file.py) file. If the error message being displayed when you attempt to upload a file in High Quality mode is: "Current operation only supports 'high-quality' datasets.", this is indicated in the class `HighQualityDatasetOnlyError` in the provided Python code: ```py class HighQualityDatasetOnlyError(BaseHTTPException): error_code = 'high_quality_dataset_only' description = "Current operation only supports 'high-quality' datasets." code = 400 ``` You can find this in the [error.py](https://github.com/langgenius/dify/blob/main/api/controllers/service_api/dataset/error.py) file. I hope this helps! If you need further assistance, please provide more details about the error message you're receiving. ## Sources - [api/controllers/console/datasets/file.py](https://github.com/langgenius/dify/blob/main/api/controllers/console/datasets/file.py) - [api/services/file_service.py](https://github.com/langgenius/dify/blob/main/api/services/file_service.py) - [api/controllers/service_api/dataset/error.py](https://github.com/langgenius/dify/blob/main/api/controllers/service_api/dataset/error.py) --- This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#933