Search
Quick Commands
run:diagnostics Run all system checks
db:connect Connect to primary DB
cache:clear Clear application cache
users:list Show all active users
Notifications

Stay on top of recent system events and updates.

  • Notification avatar
    System Update Available

    Version 2.4.1 is ready to install with new features.

    2 minutes ago

  • AB
    New User Registration

    Alex Brown from Canada has joined the platform.

    15 minutes ago

  • Notification avatar
    Backup Completed

    Daily backup has been successfully completed.

    1 hour ago

  • Notification avatar
    Security Alert

    Unusual login activity detected from new location.

    3 hours ago

  • Notification avatar
    Monthly Report Ready

    Your analytics report for September is now available.

    Yesterday

  • MJ
    Server Maintenance

    Scheduled maintenance will begin at 2:00 AM EST.

    2 days ago

File Upload Components

Native HTML5 file upload with drag & drop functionality

Drag & Drop Upload Area

Custom drag and drop file upload zone

cloud_upload
Drag & Drop Files Here

or click to browse

image
Upload Images

JPG, PNG, GIF up to 10MB

File Upload Progress

Upload progress tracking and file management

sample-document.pdf
2.4 MB
Uploading... 75%
profile-image.jpg
1.2 MB
Upload Complete
large-video.mp4
45.8 MB
Upload Failed

Uploaded Files Management

Manage and organize uploaded files

File Name Type Size Upload Date Status Actions
picture_as_pdf project-proposal.pdf
PDF 2.4 MB 2024-01-15 Uploaded
image company-logo.png
PNG 156 KB 2024-01-14 Uploaded
description meeting-notes.docx
DOCX 89 KB 2024-01-13 Processing

📋 Source Code Examples

HTML markup and JavaScript for file upload implementations

Basic File Input

Standard HTML5 file input:

<!-- Simple File Input -->
<div class="mb-3">
  <label class="form-label">Choose File</label>
  <input type="file" class="form-control" accept="image/*">
</div>

<!-- Multiple Files -->
<div class="mb-3">
  <label class="form-label">Multiple Files</label>
  <input type="file" class="form-control" multiple>
</div>

<!-- Specific File Types -->
<div class="mb-3">
  <label class="form-label">PDF Only</label>
  <input type="file" class="form-control" accept=".pdf">
</div>
Drag and Drop Upload Area

HTML structure for drag and drop upload area:

<!-- Hidden Input -->
<input type="file" id="hidden-upload-1" class="d-none" multiple>

<!-- Upload Area -->
<div class="upload-area" onclick="document.getElementById('hidden-upload-1').click()">
  <div class="text-center">
    <i class="material-symbols-rounded icon-xl text-muted mb-2">cloud_upload</i>
    <p class="mb-1">Drag and drop files here</p>
    <small class="text-muted">or click to browse</small>
  </div>
</div>
JavaScript Implementation

JavaScript code for handling file uploads:

// Get upload area and hidden input
const uploadArea = document.querySelector('.upload-area');
const hiddenInput = document.getElementById('hidden-upload-1');

// Click to browse
uploadArea.addEventListener('click', () => {
  hiddenInput.click();
});

// Handle file selection
hiddenInput.addEventListener('change', function() {
  const files = this.files;
  if (files.length > 0) {
    handleFiles(files);
  }
});

// Drag and drop handlers
uploadArea.addEventListener('dragover', (e) => {
  e.preventDefault();
  uploadArea.classList.add('dragover');
});

uploadArea.addEventListener('dragleave', (e) => {
  e.preventDefault();
  uploadArea.classList.remove('dragover');
});

uploadArea.addEventListener('drop', (e) => {
  e.preventDefault();
  uploadArea.classList.remove('dragover');
  
  const files = e.dataTransfer.files;
  if (files.length > 0) {
    handleFiles(files);
  }
});

// Process files
function handleFiles(files) {
  Array.from(files).forEach(file => {
    // Add file validation, preview, and upload logic here
  });
}
File Upload Progress

Progress indicator for file uploads:

<div class="upload-item">
  <div class="d-flex align-items-center">
    <img src="file-icon.png" alt="File" class="upload-icon">
    <div class="flex-grow-1 ms-3">
      <h6 class="mb-0">document.pdf</h6>
      <small class="text-muted">2.5 MB</small>
    </div>
    <span class="upload-status">Uploading...</span>
  </div>
  <div class="progress mt-2">
    <div class="progress-bar" role="progressbar" 
         style="width: 0%"></div>
  </div>
</div>