Need to add validation to check file extension and select file field.

Created on 1 May 2024, 8 months ago

The website encountered an unexpected error. Please try again later.

PhpOffice\PhpSpreadsheet\Reader\Exception: /var/www/web/sites/default/files/node_pictures/example_3.xlsx is an Invalid Spreadsheet file. in PhpOffice\PhpSpreadsheet\Reader\Csv->openFileOrMemory() (line 288 of /var/www/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Csv.php).

Problem/Motivation

need to implement validation to ensure that the selected file has the correct extension. Specifically, for eg. if user selects CSV as the desired file type and attempts to upload a file with a different extension, throwing error.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇮🇳India abhishek_virasat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024