Skip to content

Feat/avatar upload#514

Merged
Cedarich merged 10 commits intoPulsefy:mainfrom
benedictfred:feat/avatar-upload
Mar 30, 2026
Merged

Feat/avatar upload#514
Cedarich merged 10 commits intoPulsefy:mainfrom
benedictfred:feat/avatar-upload

Conversation

@benedictfred
Copy link
Copy Markdown
Contributor

Description

This pull request introduces a user avatar upload feature to the backend, enabling users to upload, process, and store profile images using AWS S3. The implementation includes image validation and optimization, integration with AWS S3 for storage, and updates to the user entity and API endpoints to support avatar management.

Changes Made

Avatar Upload and Processing

  • Added a new endpoint PATCH /users/me/avatar in UsersController to handle user profile image uploads, including validation for image type and processing with a custom SharpPipe for resizing and converting images to optimized WebP format.

AWS S3 Integration

  • Created UploadService for uploading processed images to AWS S3 using the AWS SDK, with configuration loaded from environment variables.
  • Added new dependencies for AWS SDK, multer, and sharp for image processing and S3 integration.

User Entity and Service Updates

  • Updated the User entity to include an optional avatar_url field for storing the image URL.
  • Implemented updateUserProfilePicture in UsersService to handle image upload, storage, and updating the user's avatar URL in the database.

Module and Dependency Wiring

  • Registered UploadModule and UploadService in relevant modules to ensure dependency injection and service availability for user-related operations.

These changes collectively provide a secure, efficient, and scalable solution for user avatar uploads and management.

Linked Issue

Closes #504

Type of Change

  • feat
  • fix
  • docs
  • refactor
  • test
  • chore

Validation

  • Lint passed for affected area(s)
  • Tests passed for affected area(s)
  • Manual verification completed (if applicable)

Testing

image

Checklist

  • Branch name uses feat/, fix/, or docs/
  • Commit messages follow Conventional Commits
  • PR scope matches linked issue acceptance criteria

@Cedarich
Please review. Thanks.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 29, 2026

@benedictfred Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Cedarich
Copy link
Copy Markdown
Contributor

@benedictfred please fix workflow

@Cedarich
Copy link
Copy Markdown
Contributor

@benedictfred

@benedictfred
Copy link
Copy Markdown
Contributor Author

@Cedarich
Please check again, I had to update the package-lock.json

@Cedarich Cedarich merged commit 6e588aa into Pulsefy:main Mar 30, 2026
1 check passed
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.

File Upload Service (Profile Pictures)

2 participants