bb-plane-fork/apps/api
Nikhil 2240ac0e74
[WEB-5583]feat: add avatar download and upload functionality in authentication adapter (#8247)
* feat: add avatar download and upload functionality in authentication adapter

- Implemented `download_and_upload_avatar` method to fetch and store user avatars from OAuth providers.
- Enhanced user data saving process to include avatar handling.
- Updated `S3Storage` class with a new `upload_file` method for direct file uploads to S3.

* feat: enhance avatar download functionality with size limit checks

- Added checks for content length before downloading avatar images to ensure they do not exceed the maximum allowed size.
- Implemented chunked downloading of avatar images to handle large files efficiently.
- Updated the upload process to return None if the upload fails, improving error handling.

* feat: improve avatar filename generation with content type handling

- Refactored avatar download logic to determine file extension based on the content type from the response headers.
- Removed redundant code for extension mapping, ensuring a cleaner implementation.
- Enhanced error handling by returning None for unsupported content types.

* fix: remove authorization header for avatar download

- Updated the avatar download logic to remove the Authorization header when token data is not present, ensuring compatibility with scenarios where authentication is not required.

* feat: add method for avatar download headers

- Introduced `get_avatar_download_headers` method to centralize header management for avatar downloads.
- Updated `download_and_upload_avatar` method to utilize the new header method, improving code clarity and maintainability.
2025-12-09 15:48:27 +05:30
..
bin chore: rename server to api (#7342) 2025-07-04 15:32:21 +05:30
plane [WEB-5583]feat: add avatar download and upload functionality in authentication adapter (#8247) 2025-12-09 15:48:27 +05:30
requirements chore(deps): upgrade psycopg packages to version 3.3.0 (#8222) 2025-12-05 16:06:19 +05:30
templates [WEB-5430] feat: allow users to change email (#8120) 2025-11-24 21:21:52 +05:30
.coveragerc chore: rename server to api (#7342) 2025-07-04 15:32:21 +05:30
.env.example - Add SIGNED_URL_EXPIRATION environment variable (#8136) 2025-12-03 10:52:19 +05:30
.prettierignore fix: eslint (#8185) 2025-12-05 16:03:51 +05:30
Dockerfile.api chore: updated node version to 22 and python version to 3.12.10 (#7343) 2025-07-04 16:28:30 +05:30
Dockerfile.dev chore: rename server to api (#7342) 2025-07-04 15:32:21 +05:30
manage.py chore: rename server to api (#7342) 2025-07-04 15:32:21 +05:30
package.json chore: version bump 2025-10-21 19:14:43 +05:30
pyproject.toml [WEB-5044] fix: ruff lint and format errors (#7868) 2025-09-29 19:15:32 +05:30
pytest.ini chore: rename server to api (#7342) 2025-07-04 15:32:21 +05:30
requirements.txt chore: rename server to api (#7342) 2025-07-04 15:32:21 +05:30
run_tests.py [WEB-5044] fix: ruff lint and format errors (#7868) 2025-09-29 19:15:32 +05:30
run_tests.sh chore: rename server to api (#7342) 2025-07-04 15:32:21 +05:30