Toggle between light and dark themes by switching a CSS class.
The uploader respects CSS variable overrides scoped to the dark class.
What you should see: the dark palette applied to the whole control, with contrast maintained rather than simply inverted.
Drag & drop files here, or paste from clipboard
<div id="container" class="dark-mode-container">
<au:AjaxFileUpload ID="Uploader1" runat="server" />
</div>
/* your own surface; the control brings its own dark palette */
.dark-mode-container.is-dark { background-color: #111827; color: #f3f4f6; }
var container = document.getElementById('container');
document.getElementById('darkToggle').addEventListener('click', function () {
var on = !container.classList.contains('is-dark');
container.classList.toggle('is-dark', on);
// au-dark is the control's built-in dark theme
container.querySelector('.au-uploader').classList.toggle('au-dark', on);
});