bb-plane-fork/apps/api/plane
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
..
analytics chore: rename server to api (#7342) 2025-07-04 15:32:21 +05:30
api chore(deps): upgrade psycopg packages to version 3.3.0 (#8222) 2025-12-05 16:06:19 +05:30
app fix: activity tracking description (#8268) 2025-12-08 22:18:14 +05:30
authentication [WEB-5583]feat: add avatar download and upload functionality in authentication adapter (#8247) 2025-12-09 15:48:27 +05:30
bgtasks [WEB-5254] chore: add bot user to create workspace seed data (#8225) 2025-12-05 18:03:58 +05:30
db [WEB-5254] chore: add bot user to create workspace seed data (#8225) 2025-12-05 18:03:58 +05:30
license [WEB-5290] feat: selfhosted check (#8227) 2025-12-03 15:53:42 +05:30
middleware [WIKI-730] chore: handle body too large error (#7963) 2025-10-14 17:21:11 +05:30
seeds/data [WEB-5058] feat: enhance workspace seeding with cycles, modules, and views creation (#7951) 2025-10-11 20:55:48 +05:30
settings [WEB-5583]feat: add avatar download and upload functionality in authentication adapter (#8247) 2025-12-09 15:48:27 +05:30
space [WIKI-804] fix: refactor image uploader (#8210) 2025-12-05 13:20:15 +05:30
static chore: rename server to api (#7342) 2025-07-04 15:32:21 +05:30
tests chore(deps): upgrade psycopg packages to version 3.3.0 (#8222) 2025-12-05 16:06:19 +05:30
throttles [WIKI-419] chore: new asset duplicate endpoint added (#7172) 2025-11-20 15:05:01 +05:30
utils [SILO-671] feat: add sticky external apis (#8139) 2025-12-01 18:57:54 +05:30
web chore: rename server to api (#7342) 2025-07-04 15:32:21 +05:30
__init__.py chore: rename server to api (#7342) 2025-07-04 15:32:21 +05:30
asgi.py chore: rename server to api (#7342) 2025-07-04 15:32:21 +05:30
celery.py [WEB-5044] fix: ruff lint and format errors (#7868) 2025-09-29 19:15:32 +05:30
urls.py [WEB-5044] fix: ruff lint and format errors (#7868) 2025-09-29 19:15:32 +05:30
wsgi.py chore: rename server to api (#7342) 2025-07-04 15:32:21 +05:30