MCPcopy Create free account
hub / github.com/error311/FileRise / updateFileInfoCount

Function updateFileInfoCount

public/js/upload.js:569–596  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

567}
568
569function updateFileInfoCount() {
570 const fileInfoContainer = document.getElementById("fileInfoContainer");
571 if (fileInfoContainer && window.selectedFiles) {
572 if (window.selectedFiles.length === 0) {
573 fileInfoContainer.innerHTML = `<span id="fileInfoDefault">No files selected</span>`;
574 } else if (window.selectedFiles.length === 1) {
575 fileInfoContainer.innerHTML = `
576 <div id="filePreviewContainer" class="file-preview-container" style="display:inline-block;">
577 <span class="material-icons file-icon">insert_drive_file</span>
578 </div>
579 <span id="fileNameDisplay" class="file-name-display">${escapeHTML(window.selectedFiles[0].name || window.selectedFiles[0].fileName || "Unnamed File")}</span>
580 `;
581 } else {
582 fileInfoContainer.innerHTML = `
583 <div id="filePreviewContainer" class="file-preview-container" style="display:inline-block;">
584 <span class="material-icons file-icon">insert_drive_file</span>
585 </div>
586 <span id="fileCountDisplay" class="file-name-display">${window.selectedFiles.length} files selected</span>
587 `;
588 }
589 const previewContainer = document.getElementById("filePreviewContainer");
590 if (previewContainer && window.selectedFiles.length > 0) {
591 previewContainer.innerHTML = "";
592 // For image files, try to show a preview (if available from the file object).
593 displayFilePreview(window.selectedFiles[0].file || window.selectedFiles[0], previewContainer);
594 }
595 }
596}
597
598function applyResumableRelativePath(file) {
599 if (!file || typeof file !== 'object') return;

Callers 5

createFileEntryFunction · 0.85
processFilesFunction · 0.85
initResumableUploadFunction · 0.85
submitFilesFunction · 0.85
refreshFileListFunction · 0.85

Calls 2

escapeHTMLFunction · 0.85
displayFilePreviewFunction · 0.85

Tested by

no test coverage detected