Skip to content

Profile Pic Upload Routes#528

Merged
maxaaronson merged 9 commits intocodeforboston:mainfrom
maxaaronson:main
Mar 24, 2026
Merged

Profile Pic Upload Routes#528
maxaaronson merged 9 commits intocodeforboston:mainfrom
maxaaronson:main

Conversation

@maxaaronson
Copy link
Collaborator

No description provided.

key,
ExtraArgs={
"ContentType": file.mimetype,
"ACL": "private",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line actually needs to be removed. ACLs are likely disabled by the object ownership settings. The statement should just be:

s3.upload_fileobj(
    file,
    bucket,
    key,
    ExtraArgs={
        "ContentType": file.mimetype,
    },
)

return jsonify({"error": "Empty file"}), 400

# Fetch user
uid = get_jwt_identity()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you fetch the user twice here. You already got this value on line 152.

@maxaaronson maxaaronson merged commit 9b2c325 into codeforboston:main Mar 24, 2026
3 checks 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.

2 participants