Upload Media

{#if files.length > 0}

Files to Upload

{#each files as file, index}
{#if file.type.startsWith('image/')} {file.name} {:else}
📄
{/if}
{file.name}
{formatFileSize(file.size)}
{#if isUploading}
{#if uploadProgress[file.name] === 100} ✓ Complete {:else if uploadProgress[file.name] > 0} {Math.round(uploadProgress[file.name] || 0)}% {:else} Waiting... {/if}
{/if}
{#if !isUploading} {/if}
{/each}
{/if}
0} class:compact={files.length > 0} class:uploading={isUploading} ondragover={handleDragOver} ondragleave={handleDragLeave} ondrop={handleDrop} >
{#if files.length === 0}

Drop images here

or click to browse and select files

Supports JPG, PNG, GIF, WebP, and SVG files

{:else}
Add more files or drop them here
{/if}
{#if successCount > 0 || uploadErrors.length > 0}
{#if successCount > 0}
✅ Successfully uploaded {successCount} file{successCount !== 1 ? 's' : ''} {#if successCount === files.length && uploadErrors.length === 0}
Redirecting to media library... {/if}
{/if} {#if uploadErrors.length > 0}

Upload Errors:

{#each uploadErrors as error}
❌ {error}
{/each}
{/if}
{/if}