Added profile pictures

This commit is contained in:
tdgmdev 2023-03-06 16:15:27 -05:00
parent 908055a85b
commit 06fedb4387
6 changed files with 108 additions and 36 deletions

View file

@ -30,6 +30,7 @@
#header {
border-bottom: var(--dark-2) solid 2px;
width: calc(100% - 30px);
}
#main {

View file

@ -1,7 +1,7 @@
<script>
import Button from '$lib/components/Button.svelte';
export let form;
export let form, apiUrl, type;
let fileInput;
let files;
@ -41,7 +41,7 @@
fData.append('last',i == (images.length - 1));
fData.append('id',rId);
form = await fetch(`/api/fileCreate`, {
form = await fetch(apiUrl || `/api/fileCreate`, {
method: 'POST',
body: fData,
}).then(x => x.json());
@ -62,9 +62,13 @@
img {
max-width: 250px;
}
.small img {
max-width: 50px;
}
</style>
<form action='#' method='GET' >
<form action='#' method='GET' class='{type || ''}' >
{#if preview}
<img src={preview} alt="Image preview"/>
{:else}