fix: Preview for local Files
continuous-integration/drone/push Build is passing Details

main
Flycro 2024-03-21 12:18:10 +01:00
parent 20d03b385b
commit ac371e4451
1 changed files with 1 additions and 0 deletions

View File

@ -145,6 +145,7 @@ async function onSubmit(event: FormSubmitEvent<any>) {
<UTextarea v-model="state.description" />
</UFormGroup>
<img v-if="state.cover_image && typeof state.cover_image === 'string'" :src="$storage(state.cover_image)" alt="Cover" class="size-1/3 content-center rounded-lg">
<img v-else-if="state.cover_image && state.cover_image instanceof File" :src="URL.createObjectURL(state.cover_image)" alt="Cover" class="size-1/3 content-center rounded-lg">
<UFormGroup label="Cover" name="cover_image">
<UInput type="file" @change="handleCoverImageInput" />
</UFormGroup>