{#if routeMode === "home"}

Share scratch files quickly

Scratchbox is a minimal temporary upload service with expiration.

No accounts, no sessions, no friction. Create a scratch, grab the URL, and share it.

{#if !uploadAllowed}

Uploads are currently unavailable from your network location.

{/if}
{:else if routeMode === "view"}
{#if viewLoading}

Loading scratch content...

{:else if viewError}
{viewError}
{:else if viewMeta} {#if viewIsImage} {`Scratch {:else if viewIsVideo} {:else if !viewIsBinary}
{viewContent}
{/if}

Expires in: {expiresInText(viewMeta.expires_at, nowMs)}

{#if copyStatusMessage}

{copyStatusMessage}

{/if} {/if}
{:else if routeMode === "upload"}

Size limit: {maxUploadSizeDisplay}

Expiration: {defaultTTLDisplay}

{#if configError}

Could not load UI config: {configError}

{/if} {#if !uploadAllowed}
Uploads are disabled for your current IP based on server allowlist settings.
{:else}
{/if} {#if errorMessage}
{errorMessage}
{/if}
{:else if routeMode === "expired"}

Scratch expired

{viewError || "The scratch you requested is no longer available because its retention time elapsed."}

{:else}

Page not found

The requested path does not exist.

{/if}