Project

General

Profile

Actions

dev #1336

open

File Validation, Link Validation, and Toast Implementation

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

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

100%

Estimated time:
8:00 h
Spent time:

Description

Description:

  • Implemented file validation for both individual files and all files in a batch, including checks for minimum file size, maximum file size, and the total file size.
  • Developed link validation to check if a provided URL points to a valid PDF file, and to ensure the link is correctly formatted.
  • Integrated Toast notification to display error messages or success messages to the user when the file or link validation fails.

Changes Made:

  1. File Validation:

    • Added checks for:
      • Individual file size validation.
      • Total file size validation for all selected files.
      • Maximum number of files validation.
      • Error messages for validation failure.
  2. Link Validation:

    • URL parsing and checking for valid PDF files using HTTP head requests.
    • Return a relevant error message if the validation fails.
  3. Toast Notification:

    • Display error messages using a customizable Toast UI.
    • Automatically show validation error messages to the user.

Steps to Verify:

  1. Add files and check individual file size, total file size, and number of files.
  2. Test link validation by providing valid and invalid PDF URLs.
  3. Ensure Toast notifications appear with relevant messages when validations fail.
Actions

Also available in: Atom PDF