Actions
CompressPdf #974
openUpdate File Name and Path Fields to Support Long File Names
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_nameandfile_pathfields toTexttype in the Prisma schema.
- Length Validation on File Name Update
- Implement a validation check on
PATCHrequests that updatefile_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_nameandfile_pathfields are updated toTextin the Prisma schema. - PATCH request for updating
file_namecorrectly 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