fix: 🐛 use accept= property correctly, use exclusively the correct mimetype for jpeg

pull/111/head
split / May 2025-01-17 18:55:40 -08:00 committed by Azalea
parent 16112d4f1d
commit 5fb5e52e54
1 changed files with 1 additions and 2 deletions

View File

@ -106,7 +106,6 @@
}).catch(e => error = e.message).finally(() => submitting = "")
break;
case "image/png":
case "image/jpg":
case "image/jpeg":
case "image/webp":
pfpCropURL = URL.createObjectURL(file);
@ -153,7 +152,7 @@
{/if}
</div>
<!-- Genuinely don't know why this is giving me an intellisense error. Works fine. -->
<input id="profile-upload" type="file" accept="image/*" style="display: none" bind:this={pfpField}
<input id="profile-upload" type="file" accept="image/gif,image/png,image/jpeg,image/webp" style="display: none" bind:this={pfpField}
on:change={handlePfpUpload} />
</div>