Commit a1e369d0 authored by Your Name's avatar Your Name

Fix: Auto-expand provider details panel on file upload

- Auto-expands the provider details panel when selecting a file to upload
- Prevents TypeError: Cannot set properties of null (setting 'innerHTML')
- Upload status is always visible after you select a file
parent 69571a8b
...@@ -140,9 +140,14 @@ let expandedProviders = new Set(); ...@@ -140,9 +140,14 @@ let expandedProviders = new Set();
const CHUNK_SIZE = 5 * 1024 * 1024; const CHUNK_SIZE = 5 * 1024 * 1024;
// Generic chunked upload handler for all providers // Generic chunked upload handler for all providers
async function uploadFileChunked(providerKey, fileType, file, configKey, configObject) { async function uploadFileChunked(providerKey, fileType, file, configObject) {
if (!file) return; if (!file) return;
// Ensure provider is expanded so status element exists
if (!expandedProviders.has(providerKey)) {
toggleProvider(providerKey);
}
const statusEl = document.getElementById(`${configObject}-upload-status-${providerKey}`); const statusEl = document.getElementById(`${configObject}-upload-status-${providerKey}`);
statusEl.innerHTML = `<div style="color: #4a9eff;">Uploading file: 0%</div>`; statusEl.innerHTML = `<div style="color: #4a9eff;">Uploading file: 0%</div>`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment