e.key === 'Enter' && handleClick()}
+ >
+
+
+
+
+ Drag files here or click to browse
+
+
+ {maxFileSize && `Max file size: ${formatBytes(maxFileSize)}`}
+ {!allowAllTypes && allowedTypes && ` • Accepted: ${allowedTypes.join(', ')}`}
+
+
+
+
+
+ {uploadingCount > 0
+ ? `Uploading ${uploadingCount} of ${uploadQueue.length} files`
+ : `${completedCount} of ${uploadQueue.length} files uploaded`
+ }
+ {failedCount > 0 && ` (${failedCount} failed)`}
+
+ {(completedCount > 0 || failedCount > 0) && (
+
+ )}
+
+
+ {/* Overall progress bar */}
+ {uploadingCount > 0 && (
+
+ )}
+
+ {/* Individual file items */}
+
+ {uploadQueue.map(item => (
+ -
+
+ {item.status === 'complete' ? :
+ item.status === 'failed' ? :
+ }
+
+
+
+
+ {item.file.name}
+
+
+ {formatBytes(item.file.size)}
+ {item.status === 'uploading' && item.speed > 0 && (
+ <>
+ {formatSpeed(item.speed)}
+ {item.startTime && (
+
+ {formatTimeRemaining(
+ (item.file.size - (item.file.size * item.progress / 100)) / item.speed
+ )} remaining
+
+ )}
+ >
+ )}
+ {item.status === 'complete' && item.artifactId && (
+
+ ID: {item.artifactId.substring(0, 12)}...
+
+ )}
+ {item.error && (
+ {item.error}
+ )}
+ {item.retryCount > 0 && item.status === 'uploading' && (
+ Retry {item.retryCount}
+ )}
+
+
+ {item.status === 'uploading' && (
+
+ )}
+
+
+
+ {item.status === 'failed' && (
+
+ )}
+ {(item.status === 'complete' || item.status === 'failed' || item.status === 'pending') && (
+
+ )}
+
+
+ ))}
+
+