Add upload page and move styles to shared assets
This commit is contained in:
@@ -0,0 +1,347 @@
|
||||
// The upload page: the placeholder button and dropping files on the page
|
||||
// feed one queue. Each file is its own request, so one failure is one file.
|
||||
// The panel follows Immich's own upload panel: summary lines, then one row
|
||||
// per file with a status icon, a progress bar while sending, and the error.
|
||||
//
|
||||
// Nothing here reads a file's contents; the bytes go straight from the File
|
||||
// to the request body.
|
||||
|
||||
import { createLimiter } from '../shared/limiter.js'
|
||||
import { fileType, formatSize, isUploadableType } from '../shared/upload.js'
|
||||
import type { UploadErrorResponse, UploadPageConfig, UploadResponse } from '../shared/upload.js'
|
||||
import {
|
||||
ICON_ALERT_CIRCLE,
|
||||
ICON_CHECK_CIRCLE,
|
||||
ICON_CIRCLE_OUTLINE,
|
||||
ICON_CLOSE,
|
||||
ICON_LOADING,
|
||||
ICON_RESTART,
|
||||
iconSvg
|
||||
} from '../shared/icons.js'
|
||||
|
||||
// Two at a time: enough to keep a phone's uplink busy without stalling every file behind one big video
|
||||
const CONCURRENT_UPLOADS = 2
|
||||
const ATTEMPTS = 3
|
||||
const RETRY_BASE_MS = 2000
|
||||
// A Retry-After longer than this is shown as a failure rather than waited out
|
||||
const MAX_RETRY_WAIT_MS = 60_000
|
||||
|
||||
const config = JSON.parse(document.getElementById('upload-init')?.textContent || '{}') as UploadPageConfig
|
||||
const run = createLimiter(CONCURRENT_UPLOADS)
|
||||
|
||||
const panelEl = document.getElementById('upload-panel') as HTMLElement
|
||||
const progressEl = document.getElementById('upload-progress') as HTMLElement
|
||||
const countsEl = document.getElementById('upload-counts') as HTMLElement
|
||||
const noteEl = document.getElementById('upload-note') as HTMLElement
|
||||
const listEl = document.getElementById('upload-list') as HTMLElement
|
||||
const dropEl = document.getElementById('upload-drop') as HTMLElement
|
||||
|
||||
type RowState = 'pending' | 'started' | 'done' | 'duplicate' | 'error'
|
||||
|
||||
const STATE_ICONS: Record<RowState, string> = {
|
||||
pending: ICON_CIRCLE_OUTLINE,
|
||||
started: ICON_LOADING,
|
||||
done: ICON_CHECK_CIRCLE,
|
||||
duplicate: ICON_ALERT_CIRCLE,
|
||||
error: ICON_ALERT_CIRCLE
|
||||
}
|
||||
|
||||
interface UploadRow {
|
||||
file: File
|
||||
type: string
|
||||
li: HTMLLIElement
|
||||
icon: HTMLElement
|
||||
action: HTMLButtonElement
|
||||
xhr?: XMLHttpRequest
|
||||
// Ends a retry wait early
|
||||
wake?: () => void
|
||||
cancelled: boolean
|
||||
}
|
||||
|
||||
/*
|
||||
Counts for the batch on screen, as Immich shows them. Files added while a
|
||||
batch is still sending join it; the first file after a batch has finished
|
||||
starts a new one.
|
||||
*/
|
||||
const stats = { total: 0, remaining: 0, uploaded: 0, errors: 0, duplicates: 0 }
|
||||
|
||||
function updateSummary () {
|
||||
progressEl.textContent = `Remaining ${stats.remaining} - Processed ${stats.total - stats.remaining}/${stats.total}`
|
||||
countsEl.innerHTML = 'Uploaded <span class="upload-count-success"></span> - Errors <span class="upload-count-danger"></span> - Duplicates <span class="upload-count-warning"></span>'
|
||||
const [uploaded, errors, duplicates] = countsEl.querySelectorAll('span')
|
||||
uploaded.textContent = String(stats.uploaded)
|
||||
errors.textContent = String(stats.errors)
|
||||
duplicates.textContent = String(stats.duplicates)
|
||||
noteEl.hidden = stats.remaining > 0 || stats.uploaded === 0
|
||||
}
|
||||
|
||||
function setState (row: UploadRow, state: RowState) {
|
||||
row.li.dataset.state = state
|
||||
row.icon.innerHTML = iconSvg(STATE_ICONS[state])
|
||||
}
|
||||
|
||||
/** Swap the row's button: cancel while queued or sending, retry or dismiss afterwards. */
|
||||
function setAction (row: UploadRow, kind: 'cancel' | 'retry' | 'dismiss') {
|
||||
const labels = { cancel: 'Cancel', retry: 'Retry', dismiss: 'Dismiss' }
|
||||
row.action.dataset.kind = kind
|
||||
row.action.setAttribute('aria-label', labels[kind] + ' ' + row.file.name)
|
||||
row.action.title = labels[kind]
|
||||
row.action.innerHTML = iconSvg(kind === 'retry' ? ICON_RESTART : ICON_CLOSE)
|
||||
}
|
||||
|
||||
/** Remove any progress bar or error line under the row's main line. */
|
||||
function clearDetail (row: UploadRow) {
|
||||
row.li.querySelector('.upload-row-detail')?.remove()
|
||||
}
|
||||
|
||||
function showProgress (row: UploadRow, text: string, percent: number) {
|
||||
let bar = row.li.querySelector('.upload-row-detail.upload-bar') as HTMLElement | null
|
||||
if (!bar) {
|
||||
clearDetail(row)
|
||||
bar = document.createElement('div')
|
||||
bar.className = 'upload-row-detail upload-bar'
|
||||
bar.innerHTML = '<div class="upload-bar-fill"></div><p class="upload-bar-text"></p>'
|
||||
row.li.appendChild(bar)
|
||||
}
|
||||
const fill = bar.firstElementChild as HTMLElement
|
||||
const label = bar.lastElementChild as HTMLElement
|
||||
fill.style.width = percent + '%'
|
||||
label.textContent = text
|
||||
}
|
||||
|
||||
function showError (row: UploadRow, message: string) {
|
||||
clearDetail(row)
|
||||
const p = document.createElement('p')
|
||||
p.className = 'upload-row-detail upload-row-error'
|
||||
p.textContent = message
|
||||
row.li.appendChild(p)
|
||||
}
|
||||
|
||||
/** Record a finished row: its state, its counter, and the button it keeps. */
|
||||
function finish (row: UploadRow, state: 'done' | 'duplicate' | 'error', message?: string, retryable = false) {
|
||||
setState(row, state)
|
||||
clearDetail(row)
|
||||
if (state === 'error') {
|
||||
stats.errors++
|
||||
if (message) showError(row, message)
|
||||
} else if (state === 'duplicate') {
|
||||
stats.duplicates++
|
||||
} else {
|
||||
stats.uploaded++
|
||||
}
|
||||
setAction(row, retryable ? 'retry' : 'dismiss')
|
||||
}
|
||||
|
||||
/** Build the panel row for one file: status icon, name, and its button. */
|
||||
function addRow (file: File, type: string): UploadRow {
|
||||
const li = document.createElement('li')
|
||||
li.className = 'upload-row'
|
||||
const line = document.createElement('div')
|
||||
line.className = 'upload-row-line'
|
||||
const icon = document.createElement('span')
|
||||
icon.className = 'upload-row-icon'
|
||||
const name = document.createElement('span')
|
||||
name.className = 'upload-row-name'
|
||||
name.textContent = file.name
|
||||
const action = document.createElement('button')
|
||||
action.type = 'button'
|
||||
action.className = 'upload-row-action'
|
||||
line.append(icon, name, action)
|
||||
li.appendChild(line)
|
||||
listEl.appendChild(li)
|
||||
|
||||
const row: UploadRow = { file, type, li, icon, action, cancelled: false }
|
||||
setState(row, 'pending')
|
||||
setAction(row, 'cancel')
|
||||
action.addEventListener('click', () => {
|
||||
if (action.dataset.kind === 'retry') {
|
||||
// A retried file rejoins the batch on screen
|
||||
stats.errors--
|
||||
queue(row)
|
||||
return
|
||||
}
|
||||
// Cancel and dismiss both take the row away; a cancelled file is not counted
|
||||
if (action.dataset.kind === 'cancel') {
|
||||
row.cancelled = true
|
||||
row.xhr?.abort()
|
||||
row.wake?.()
|
||||
}
|
||||
li.remove()
|
||||
})
|
||||
return row
|
||||
}
|
||||
|
||||
type Attempt =
|
||||
| { outcome: 'sent', duplicate: boolean }
|
||||
| { outcome: 'failed', message: string }
|
||||
| { outcome: 'retry', waitMs: number }
|
||||
| { outcome: 'cancelled' }
|
||||
|
||||
/** The visitor-facing reason for a refused upload. */
|
||||
function failureMessage (xhr: XMLHttpRequest): string {
|
||||
let reply: Partial<UploadErrorResponse> | undefined
|
||||
try { reply = JSON.parse(xhr.responseText) } catch { }
|
||||
if (reply?.error) return reply.error
|
||||
// Not our JSON, so a proxy in front of the upload service answered
|
||||
if (xhr.status === 413) return 'Too large for this server'
|
||||
if (xhr.status === 404) return 'This share no longer accepts photos. Reload the page.'
|
||||
return 'Could not be sent'
|
||||
}
|
||||
|
||||
/** One request for one file. XHR rather than fetch, because only XHR reports upload progress. */
|
||||
function attempt (row: UploadRow, attemptNumber: number): Promise<Attempt> {
|
||||
return new Promise(resolve => {
|
||||
const timestamp = new Date(row.file.lastModified || Date.now()).toISOString()
|
||||
const query = new URLSearchParams({ filename: row.file.name, fileCreatedAt: timestamp, fileModifiedAt: timestamp })
|
||||
const xhr = new XMLHttpRequest()
|
||||
row.xhr = xhr
|
||||
const started = Date.now()
|
||||
xhr.open('POST', config.uploadUrl + '?' + query.toString())
|
||||
xhr.setRequestHeader('Content-Type', row.type)
|
||||
xhr.upload.addEventListener('progress', e => {
|
||||
if (!e.lengthComputable) return
|
||||
const percent = Math.round((e.loaded / e.total) * 100)
|
||||
const seconds = (Date.now() - started) / 1000
|
||||
const speed = seconds > 0 ? e.loaded / seconds : 0
|
||||
const eta = speed > 0 ? Math.ceil((e.total - e.loaded) / speed) : 0
|
||||
showProgress(row, `${percent}% - ${formatSize(Math.round(speed))}/s - ${eta}s`, percent)
|
||||
})
|
||||
|
||||
const backoff = { outcome: 'retry', waitMs: RETRY_BASE_MS * 2 ** (attemptNumber - 1) } as const
|
||||
xhr.addEventListener('load', () => {
|
||||
if (xhr.status >= 200 && xhr.status < 300) {
|
||||
let reply: Partial<UploadResponse> | undefined
|
||||
try { reply = JSON.parse(xhr.responseText) } catch { }
|
||||
resolve({ outcome: 'sent', duplicate: reply?.status === 'duplicate' })
|
||||
} else if (xhr.status === 429) {
|
||||
const seconds = Number(xhr.getResponseHeader('Retry-After'))
|
||||
resolve(Number.isFinite(seconds) && seconds > 0 ? { outcome: 'retry', waitMs: seconds * 1000 } : backoff)
|
||||
} else {
|
||||
resolve({ outcome: 'failed', message: failureMessage(xhr) })
|
||||
}
|
||||
})
|
||||
// A refusal that closes the connection mid-body often arrives as a network error
|
||||
xhr.addEventListener('error', () => resolve(backoff))
|
||||
xhr.addEventListener('abort', () => resolve({ outcome: 'cancelled' }))
|
||||
xhr.send(row.file)
|
||||
})
|
||||
}
|
||||
|
||||
/** Wait before a retry; cancelling the row ends the wait. */
|
||||
function waitToRetry (row: UploadRow, ms: number): Promise<void> {
|
||||
return new Promise(resolve => {
|
||||
const timer = setTimeout(resolve, ms)
|
||||
row.wake = () => {
|
||||
clearTimeout(timer)
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** Send one file, retrying a rate limit or a network error, and record the result on its row. */
|
||||
async function sendFile (row: UploadRow) {
|
||||
for (let attemptNumber = 1; !row.cancelled; attemptNumber++) {
|
||||
setState(row, 'started')
|
||||
showProgress(row, '0%', 0)
|
||||
const result = await attempt(row, attemptNumber)
|
||||
if (result.outcome === 'cancelled') return
|
||||
if (result.outcome === 'sent') {
|
||||
finish(row, result.duplicate ? 'duplicate' : 'done')
|
||||
return
|
||||
}
|
||||
if (result.outcome === 'failed') {
|
||||
finish(row, 'error', result.message, true)
|
||||
return
|
||||
}
|
||||
if (attemptNumber >= ATTEMPTS || result.waitMs > MAX_RETRY_WAIT_MS) {
|
||||
finish(row, 'error', 'Could not be sent. Try again later.', true)
|
||||
return
|
||||
}
|
||||
setState(row, 'pending')
|
||||
showProgress(row, 'Waiting to retry', 0)
|
||||
await waitToRetry(row, result.waitMs)
|
||||
}
|
||||
}
|
||||
|
||||
/** Start a new batch if the last one has finished. */
|
||||
function startBatchIfIdle () {
|
||||
if (stats.remaining > 0) return
|
||||
stats.total = stats.uploaded = stats.errors = stats.duplicates = 0
|
||||
}
|
||||
|
||||
/** Put a row in the send queue and count it as remaining. */
|
||||
function queue (row: UploadRow) {
|
||||
row.cancelled = false
|
||||
setState(row, 'pending')
|
||||
setAction(row, 'cancel')
|
||||
clearDetail(row)
|
||||
stats.remaining++
|
||||
updateSummary()
|
||||
run(() => row.cancelled ? Promise.resolve() : sendFile(row)).finally(() => {
|
||||
stats.remaining--
|
||||
// A cancelled file leaves the batch altogether
|
||||
if (row.cancelled) stats.total--
|
||||
updateSummary()
|
||||
})
|
||||
}
|
||||
|
||||
/** Queue files. Anything the server would refuse anyway is refused here, before it costs the visitor's uplink. */
|
||||
function queueFiles (files: File[]) {
|
||||
if (!files.length) return
|
||||
startBatchIfIdle()
|
||||
panelEl.hidden = false
|
||||
for (const file of files) {
|
||||
const type = fileType(file.name, file.type)
|
||||
const row = addRow(file, type)
|
||||
stats.total++
|
||||
if (!isUploadableType(type)) {
|
||||
finish(row, 'error', 'Only photos and videos can be sent')
|
||||
} else if (file.size > config.maxFileSize) {
|
||||
finish(row, 'error', 'Larger than the ' + formatSize(config.maxFileSize) + ' limit')
|
||||
} else {
|
||||
queue(row)
|
||||
}
|
||||
}
|
||||
updateSummary()
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the drop overlay while a drag carrying files is over the window.
|
||||
* `dragenter` and `dragleave` fire per element, so the depth counter stops
|
||||
* the overlay flickering as the pointer crosses child nodes.
|
||||
*/
|
||||
function setupDragAndDrop () {
|
||||
let depth = 0
|
||||
const carriesFiles = (e: DragEvent) => !!e.dataTransfer?.types?.includes('Files')
|
||||
const hide = () => {
|
||||
depth = 0
|
||||
dropEl.hidden = true
|
||||
}
|
||||
window.addEventListener('dragenter', e => {
|
||||
if (!carriesFiles(e)) return
|
||||
depth++
|
||||
dropEl.hidden = false
|
||||
})
|
||||
window.addEventListener('dragover', e => {
|
||||
// Without this the browser opens the dropped file instead
|
||||
if (carriesFiles(e)) e.preventDefault()
|
||||
})
|
||||
window.addEventListener('dragleave', () => {
|
||||
if (--depth <= 0) hide()
|
||||
})
|
||||
window.addEventListener('drop', e => {
|
||||
if (!carriesFiles(e)) return
|
||||
e.preventDefault()
|
||||
hide()
|
||||
queueFiles(Array.from(e.dataTransfer?.files || []))
|
||||
})
|
||||
}
|
||||
|
||||
const input = document.getElementById('upload-input') as HTMLInputElement
|
||||
document.getElementById('upload-choose')?.addEventListener('click', () => input.click())
|
||||
input.addEventListener('change', () => {
|
||||
queueFiles(Array.from(input.files || []))
|
||||
// So picking the same file again still fires `change`
|
||||
input.value = ''
|
||||
})
|
||||
setupDragAndDrop()
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
Material Design Icons (https://pictogrammers.com/library/mdi/), the set
|
||||
Immich uses, as SVG path data. Shared by the page view and the client.
|
||||
*/
|
||||
|
||||
export const ICON_ARROW_LEFT = 'M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z'
|
||||
export const ICON_CLOUD_UPLOAD = 'M6.5 20Q4.22 20 2.61 18.43 1 16.85 1 14.58 1 12.63 2.17 11.1 3.35 9.57 5.25 9.15 5.88 6.85 7.75 5.43 9.63 4 12 4 14.93 4 16.96 6.04 19 8.07 19 11 20.73 11.2 21.86 12.5 23 13.78 23 15.5 23 17.38 21.69 18.69 20.38 20 18.5 20H13Q12.18 20 11.59 19.41 11 18.83 11 18V12.85L9.4 14.4L8 13L12 9L16 13L14.6 14.4L13 12.85V18H18.5Q19.55 18 20.27 17.27 21 16.55 21 15.5 21 14.45 20.27 13.73 19.55 13 18.5 13H17V11Q17 8.93 15.54 7.46 14.08 6 12 6 9.93 6 8.46 7.46 7 8.93 7 11H6.5Q5.05 11 4.03 12.03 3 13.05 3 14.5 3 15.95 4.03 17 5.05 18 6.5 18H9V20M12 13Z'
|
||||
export const ICON_CIRCLE_OUTLINE = 'M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z'
|
||||
export const ICON_LOADING = 'M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z'
|
||||
export const ICON_CHECK_CIRCLE = 'M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z'
|
||||
export const ICON_ALERT_CIRCLE = 'M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z'
|
||||
export const ICON_CLOSE = 'M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z'
|
||||
export const ICON_RESTART = 'M12,4C14.1,4 16.1,4.8 17.6,6.3C20.7,9.4 20.7,14.5 17.6,17.6C15.8,19.5 13.3,20.2 10.9,19.9L11.4,17.9C13.1,18.1 14.9,17.5 16.2,16.2C18.5,13.9 18.5,10.1 16.2,7.7C15.1,6.6 13.5,6 12,6V10.6L7,5.6L12,0.6V4M6.3,17.6C3.7,15 3.3,11 5.1,7.9L6.6,9.4C5.5,11.6 5.9,14.4 7.8,16.2C8.3,16.7 8.9,17.1 9.6,17.4L9,19.4C8,19 7.1,18.4 6.3,17.6Z'
|
||||
|
||||
/** An inline SVG element's markup for one icon path. */
|
||||
export function iconSvg (path: string, className = ''): string {
|
||||
return `<svg viewBox="0 0 24 24" aria-hidden="true"${className ? ` class="${className}"` : ''}><path fill="currentColor" d="${path}"/></svg>`
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import { jsonForInlineScript, ThemeScript } from '@ipp/core'
|
||||
import { ICON_ARROW_LEFT, ICON_CLOUD_UPLOAD } from '../shared/icons'
|
||||
import { UPLOAD_ACCEPT, UploadPageConfig } from '../shared/upload'
|
||||
import { ASSET_VERSION } from '../version'
|
||||
|
||||
@@ -10,7 +11,19 @@ export interface UploadPageProps {
|
||||
galleryLink?: string
|
||||
}
|
||||
|
||||
/** The upload page for one share: the share title, the picker, and the list the client fills. */
|
||||
function Icon ({ path, class: className }: { path: string, class?: string }) {
|
||||
return (
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true" class={className}>
|
||||
<path fill="currentColor" d={path}/>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* The upload page for one share, in the look of Immich's own upload UI: the
|
||||
* gallery's header, a placeholder to click or drop on, and an upload panel
|
||||
* the client fills.
|
||||
*/
|
||||
export function UploadPage ({ config, basePath, galleryLink }: UploadPageProps) {
|
||||
const staticPath = `${basePath}/share/static/${ASSET_VERSION}`
|
||||
return (
|
||||
@@ -19,25 +32,40 @@ export function UploadPage ({ config, basePath, galleryLink }: UploadPageProps)
|
||||
<ThemeScript/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta name="robots" content="noindex"/>
|
||||
<title>{'Send photos to ' + config.title}</title>
|
||||
<title>{'Add photos to ' + config.title}</title>
|
||||
<link rel="icon" href={basePath + '/share/static/favicon.ico'} type="image/x-icon"/>
|
||||
<link type="text/css" rel="stylesheet" href={staticPath + '/pico.min.css'}/>
|
||||
<link type="text/css" rel="stylesheet" href={staticPath + '/theme.css'}/>
|
||||
<link type="text/css" rel="stylesheet" href={staticPath + '/style.css'}/>
|
||||
</head>
|
||||
<body>
|
||||
<main class="container upload-page">
|
||||
<h1>Send photos to <em>{config.title}</em></h1>
|
||||
<button id="upload-choose" type="button" class="upload-choose">Choose photos</button>
|
||||
<header id="header">
|
||||
{galleryLink && (
|
||||
<a class="header-action" href={galleryLink} title="Back to gallery" aria-label="Back to gallery">
|
||||
<Icon path={ICON_ARROW_LEFT}/>
|
||||
</a>
|
||||
)}
|
||||
<div class="header-text">
|
||||
<h1>{config.title}</h1>
|
||||
<p class="subtitle">Add photos and videos</p>
|
||||
</div>
|
||||
</header>
|
||||
<main id="upload-main">
|
||||
<button id="upload-choose" type="button" class="upload-placeholder">
|
||||
<Icon path={ICON_CLOUD_UPLOAD} class="upload-placeholder-icon"/>
|
||||
<span class="upload-placeholder-title">Add photos</span>
|
||||
<span class="upload-placeholder-text">Choose photos and videos<span class="upload-drop-hint">, or drop them here</span></span>
|
||||
</button>
|
||||
<input id="upload-input" type="file" multiple accept={UPLOAD_ACCEPT} hidden/>
|
||||
{galleryLink && <p><a class="upload-back" href={galleryLink}>Back to gallery</a></p>}
|
||||
<section id="upload-batch" hidden aria-live="polite">
|
||||
<h2 id="upload-status"></h2>
|
||||
<section id="upload-panel" hidden aria-live="polite" aria-label="Uploads">
|
||||
<p id="upload-progress"></p>
|
||||
<p id="upload-counts"></p>
|
||||
<p id="upload-note" hidden>New photos appear in the gallery once Immich has processed them.</p>
|
||||
<ul id="upload-list"></ul>
|
||||
</section>
|
||||
</main>
|
||||
<div id="upload-drop" hidden>
|
||||
<p>Drop to send photos to <em>{config.title}</em></p>
|
||||
<Icon path={ICON_CLOUD_UPLOAD} class="upload-drop-icon"/>
|
||||
<p>Drop files to upload</p>
|
||||
</div>
|
||||
<script type="application/json" id="upload-init" dangerouslySetInnerHTML={{ __html: jsonForInlineScript(config) }}/>
|
||||
<script type="module" src={staticPath + '/js/client/upload.js'}></script>
|
||||
|
||||
Reference in New Issue
Block a user