Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Remove an avatar #371

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

acidbubbles
Copy link
Contributor

This was... harder than I thought.

image

When there's an avatar, just show a remove button. When you click remove, you can upload or generate one.

To achieve that though, because the avatar field was used and it's using a multipart post, I had to be creative. I'm posting a clearAvatar item, which is converted to '' in the db call, which is then passed as $unset.

I didn't want to refactor, so that's the best I could find. otherwise, maybe it would be easier to have a separate "ordinary" POST with the character JSON, and separately upload the image from the client, instead of doing that on the server?

For now that should work fine.

@acidbubbles acidbubbles changed the title Remove an avatar Feat: Remove an avatar May 28, 2023
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.

1 participant