Project

General

Profile

Actions

CompressPdf #974

open

Update File Name and Path Fields to Support Long File Names

Added by Zahid Hassan over 1 year ago. Updated over 1 year ago.

Status:
Complete
Priority:
High
Assignee:
Category:
bug
Target version:
Start date:
11/12/2024
Due date:
11/12/2024 (about 17 months late)
% Done:

100%

Estimated time:
2:00 h
Spent time:

Description

Description

This issue addresses the need to support longer file names and paths in the application. We have updated the data type of file_name and file_path fields in the Prisma schema from String to Text. This change allows users to store long file names without hitting character limits.

However, a check is required to ensure compatibility with browser download limits, as browsers typically support a maximum filename length of 244 characters.


Scope of Work

  • Prisma Schema Update
  • Update file_name and file_path fields to Text type in the Prisma schema.
  • Length Validation on File Name Update
  • Implement a validation check on PATCH requests that update file_name.
  • Ensure the new file name length does not exceed 244 characters.
  • If the file name length exceeds 244 characters, return a validation error message.
  • Testing
  • Test the schema changes to confirm that longer file names are stored correctly in the database.
  • Test the validation to ensure that an error is returned if a file name exceeds 244 characters.
  • Test file download functionality in the browser to verify that downloads work with file names up to 244 characters.

Acceptance Criteria

  • file_name and file_path fields are updated to Text in the Prisma schema.
  • PATCH request for updating file_name correctly validates the length, allowing up to 244 characters.
  • An appropriate error message is returned if a file name exceeds 244 characters.
  • Browser downloads work without issues for file names within the specified character limit.
Actions

Also available in: Atom PDF