Project

General

Profile

Actions

dev #1335

open

Setup for File Validation

Added by Ayat Rahman over 1 year ago. Updated over 1 year ago.

Status:
Complete
Priority:
High
Assignee:
Target version:
Start date:
12/02/2024
Due date:
12/02/2024 (about 16 months late)
% Done:

100%

Estimated time:
7:00 h
Spent time:

Description

Description:

We need to establish file validation parameters based on the selected tool, including individual file size limits, maximum number of files, and total file size limits. This setup will ensure that uploaded files meet the specified constraints. A helper function will be created to handle the dynamic updating of these limits based on the selected tool, and updates will be listened for to adjust the validation accordingly.

Tasks:

  1. Create Constants for File Validation:

    • Objective: Define constants for each validation parameter.
    • Details:
      • Create a constant structure that contains the following for each tool:
        • Minimum and maximum individual file size.
        • Maximum number of files allowed.
        • Total file size limit (sum of all files).
      • These constants should be updated based on the tool selected by the user.
  2. Create Helper Function to Provide Updated Limiting Parameters:

    • Objective: Develop a function to retrieve and return the current file validation parameters.
    • Details:
      • The function will take the selected tool as input and return the appropriate validation limits for:
        • File size (min/max).
        • Max number of files.
        • Total size limit for all files.
      • The function should be able to dynamically update these parameters when the selected tool changes.
  3. Listen for Selected Tool Updates:

    • Objective: Listen for changes in the selected tool and update the validation limits accordingly.
    • Details:
      • Set up an event listener or state watcher to detect when the selected tool changes.
      • On tool update, retrieve the updated validation limits using the helper function.
      • Ensure the limits are reflected in the file upload process, preventing users from uploading files that exceed the defined limits.

Acceptance Criteria:

  • Constants are created and structured properly for all tools.
  • Helper function accurately provides updated parameters.
  • File validation limits are dynamically adjusted based on the selected tool.

Actions #1

Updated by Ayat Rahman over 1 year ago

  • Target version changed from November Sprint 4 to December Sprint 5
Actions

Also available in: Atom PDF