Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(workflow): add configurable workflow file upload limit #10176

Merged
merged 4 commits into from
Nov 4, 2024

Conversation

laipz8200
Copy link
Member

@laipz8200 laipz8200 commented Nov 1, 2024

Checklist:

Important

Please review the checklist below before submitting your pull request.

  • Please open an issue before creating a PR or link to an existing issue
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Description

  • Introduced WORKFLOW_FILE_UPLOAD_LIMIT configuration to set maximum number of files allowed in workflow upload.
  • Updated .env.example and docker-compose.yaml to include new configuration variable.
  • Refactored various controllers and components to use shared parameters fields and helper functions.
  • Implemented API changes to retrieve and enforce the new file upload limit.
  • Enhanced UI components to respect the configured file upload limit dynamically using swr for fetching configuration.

img_v3_02g7_a1e31b0f-8508-450d-a4fa-25a61fca3f3g

Close #9137

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade

Testing Instructions

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

@laipz8200 laipz8200 requested a review from zxhlyh November 1, 2024 11:00
- Introduced `WORKFLOW_FILE_UPLOAD_LIMIT` configuration to set maximum number of files allowed in workflow upload.
- Updated `.env.example` and `docker-compose.yaml` to include new configuration variable.
- Refactored various controllers and components to use shared parameters fields and helper functions.
- Implemented API changes to retrieve and enforce the new file upload limit.
- Enhanced UI components to respect the configured file upload limit dynamically using `swr` for fetching configuration.
@laipz8200 laipz8200 force-pushed the feat/add-configurable-workflow-file-upload-limit branch from ed6677d to c904aeb Compare November 1, 2024 11:02
@laipz8200 laipz8200 marked this pull request as ready for review November 1, 2024 11:10
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 🌊 feat:workflow Workflow related stuff. labels Nov 1, 2024
@laipz8200 laipz8200 requested review from JzoNgKVO and removed request for zxhlyh November 1, 2024 11:11
@laipz8200 laipz8200 self-assigned this Nov 1, 2024
JzoNgKVO
JzoNgKVO previously approved these changes Nov 2, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 2, 2024
- Removed `FileUploadConfig` model and its references.
- Replaced usage with `FileExtraConfig` for model validation.
- Cleaned up imports by removing unused dependencies.
@laipz8200 laipz8200 merged commit 6452342 into main Nov 4, 2024
15 checks passed
@laipz8200 laipz8200 deleted the feat/add-configurable-workflow-file-upload-limit branch November 4, 2024 07:55
Nov1c444 pushed a commit that referenced this pull request Nov 5, 2024
Yeuoly pushed a commit that referenced this pull request Nov 5, 2024
iamjoel pushed a commit that referenced this pull request Nov 7, 2024
AlwaysBluer pushed a commit to AlwaysBluer/dify that referenced this pull request Nov 14, 2024
idonotknow pushed a commit to AceDataCloud/Dify that referenced this pull request Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌊 feat:workflow Workflow related stuff. lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase vision files limit
2 participants