Skip to content

Conversation

@ImBIOS
Copy link

@ImBIOS ImBIOS commented Nov 30, 2025

Summary

Fixed critical bugs in the image resizing Lambda function that were preventing resized images from being created and displayed properly.

Issues Fixed

  1. Variable name error: Fixed undefined resized_path variable in download_and_resize function (line 61)
  2. Duplicate upload: Removed redundant upload operation that was happening twice
  3. Missing parameter: Added target_bucket parameter to download_and_resize function
  4. Poor error handling: Improved handling of non-image files to prevent unnecessary uploads

Testing

  • Verified image files are properly resized and uploaded to the resized bucket
  • Confirmed non-image files are skipped without attempting resize operations
  • Tested that the web interface now correctly displays both original and resized images with proper file sizes

Before/After

Before: Resized images showed "(bytes)" without actual file sizes in the web interface
After: Resized images display proper file sizes and are accessible via presigned URLs

…ove error handling

- Fixed undefined 'resized_path' variable in download_and_resize function
- Removed duplicate upload operation that was happening twice
- Added target_bucket parameter to download_and_resize function
- Improved error handling for non-image files
- Tested with both image and non-image files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants