Commit Graph

14 Commits

Author SHA1 Message Date
Ken Johnson 705f7508aa Fix flash messages not appearing after file upload
Changed flash message handling to ensure success and error messages
are visible to users after file upload attempts.

Changes:
- Use flash.now for validation errors (no file, wrong type, too large)
  so messages display immediately without redirect
- Re-render index page on validation errors instead of redirecting
- Keep regular flash for success messages to persist through redirect
- Refactored file listing into load_uploaded_files helper method

Before: Flash messages were set but not displaying after redirect
After: Users see clear feedback for all upload outcomes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 13:13:22 +00:00
Ken Johnson f21da3f075 Improve file upload UX with validation and uploaded files display
Enhanced the benefit forms file upload functionality to provide better
user feedback and visibility of uploaded files.

Changes:
1. Added file type validation in controller:
   - Only accepts PDF, DOC, DOCX, JPG, PNG formats
   - Shows clear error message with the rejected file extension

2. Added file size validation:
   - Maximum 10MB file size limit
   - Shows file size in error message if exceeded

3. Improved success/error messages:
   - Shows specific filename on successful upload
   - Shows detailed error messages for validation failures

4. Added uploaded files display section:
   - Lists all uploaded files with icons based on file type
   - Shows file size and upload timestamp
   - Provides download button for each file
   - Only displays when files exist

Before: Users received generic "Something went wrong" message with no
indication of why uploads failed. No way to see uploaded files.

After: Clear validation feedback tells users exactly what went wrong
(wrong format, too large, etc.) and uploaded files are visible with
download links.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 13:13:21 +00:00
Joseph Mastey 4587a5ff67 more fixes for tests post-merge 2017-12-12 15:25:37 -06:00
Joseph Mastey 9902345291 chore(rubocop): giganto rubocop commit.
muahahahah
2017-12-05 18:46:21 -06:00
cktricky 7f5af27478 removed comments and Fixed Issue #184 2016-04-19 08:43:18 -04:00
James Espinosa 7e4fad462b Convert file indentation to spaces 2014-07-05 20:17:27 -05:00
James Espinosa 68e6a01743 Clean up trailing and leading whitespace 2014-07-05 19:15:32 -05:00
John Poulin 4bff205e81 added in johns constantize change as well as some other stuff like CSS fun 2014-04-17 20:10:53 -04:00
Ken Johnson ce6f32a1a2 working command injection in fileupload, closes issue #23 2013-07-09 16:36:03 -04:00
Ken Johnson ea2014b637 I have exhausted all thoughts on how to actually get jquery file upload to work, so screw it, I am just going to make something homegrown for tomorrow 2013-07-09 13:53:00 -04:00
Ken Johnson d445e59a98 this fixes issue #20, seriously, no clue how I missed the missing constantize code 2013-06-06 16:43:58 -04:00
Ken Johnson 88ea613da6 okay, write-up finished 2013-06-02 23:32:37 -04:00
Ken Johnson 86695e9e07 removed excess commented code 2013-06-02 22:42:50 -04:00
Ken Johnson e97afb9bb4 added a very dangerous, very serious vulnerability (constantize 2013-06-02 22:42:29 -04:00