|
|
|
|
@ -880,6 +880,9 @@ class DocumentService:
|
|
|
|
|
website_info = knowledge_config.data_source.info_list.website_info_list
|
|
|
|
|
count = len(website_info.urls) # type: ignore
|
|
|
|
|
batch_upload_limit = int(dify_config.BATCH_UPLOAD_LIMIT)
|
|
|
|
|
|
|
|
|
|
if features.billing.subscription.plan == "sandbox" and count > 1:
|
|
|
|
|
raise ValueError("Your current plan does not support batch upload, please upgrade your plan.")
|
|
|
|
|
if count > batch_upload_limit:
|
|
|
|
|
raise ValueError(f"You have reached the batch upload limit of {batch_upload_limit}.")
|
|
|
|
|
|
|
|
|
|
@ -1328,6 +1331,8 @@ class DocumentService:
|
|
|
|
|
website_info = knowledge_config.data_source.info_list.website_info_list # type: ignore
|
|
|
|
|
if website_info:
|
|
|
|
|
count = len(website_info.urls)
|
|
|
|
|
if features.billing.subscription.plan == "sandbox" and count > 1:
|
|
|
|
|
raise ValueError("Your current plan does not support batch upload, please upgrade your plan.")
|
|
|
|
|
batch_upload_limit = int(dify_config.BATCH_UPLOAD_LIMIT)
|
|
|
|
|
if count > batch_upload_limit:
|
|
|
|
|
raise ValueError(f"You have reached the batch upload limit of {batch_upload_limit}.")
|
|
|
|
|
|