Fix avatar upload form - use proper multipart form
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -256,18 +256,16 @@
|
|||||||
<div class="avatar-info">
|
<div class="avatar-info">
|
||||||
<h3>Current Avatar</h3>
|
<h3>Current Avatar</h3>
|
||||||
<p>Upload a new profile picture to personalize your account</p>
|
<p>Upload a new profile picture to personalize your account</p>
|
||||||
|
<form id="upload-form" method="POST" action="{{ url_for('upload_avatar') }}" enctype="multipart/form-data">
|
||||||
<div class="file-upload">
|
<div class="file-upload">
|
||||||
<input type="file" id="avatar" name="avatar" accept="image/*" onchange="document.getElementById('upload-form').submit()">
|
<input type="file" id="avatar" name="avatar" accept="image/*" onchange="this.form.submit()">
|
||||||
<label for="avatar" class="file-upload-label">Choose New Picture</label>
|
<label for="avatar" class="file-upload-label">Choose New Picture</label>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-text">PNG, JPG, or GIF. Maximum size 2MB.</p>
|
<p class="help-text">PNG, JPG, or GIF. Maximum size 2MB.</p>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
<form id="upload-form" method="POST" action="{{ url_for('upload_avatar') }}" enctype="multipart/form-data" style="display: none;">
|
</div>
|
||||||
<input type="hidden" name="avatar" id="avatar-hidden">
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
|
|||||||
Reference in New Issue
Block a user