summaryrefslogtreecommitdiff
path: root/resources/views/files/upload.blade.php
diff options
context:
space:
mode:
Diffstat (limited to 'resources/views/files/upload.blade.php')
-rw-r--r--resources/views/files/upload.blade.php88
1 files changed, 88 insertions, 0 deletions
diff --git a/resources/views/files/upload.blade.php b/resources/views/files/upload.blade.php
new file mode 100644
index 0000000..41cf933
--- /dev/null
+++ b/resources/views/files/upload.blade.php
@@ -0,0 +1,88 @@
+@extends('template')
+
+@section('content')
+
+<section>
+ <h5>File Upload</h5>
+ <h6><a href="{{ route('files.browse') }}">Browse Uploaded Files</a></h6>
+
+ <!-- Success Messages -->
+ @if(session('success'))
+ <div style="background-color: #d4edda; border: 1px solid #c3e6cb; color: #155724; padding: 10px; margin-bottom: 15px;">
+ <strong>{{ session('success') }}</strong>
+ @if(session('urls'))
+ <div style="margin-top: 10px;">
+ <strong>Download URLs:</strong>
+ <ul>
+ @foreach(session('urls') as $url)
+ <li><a href="{{ $url }}">{{ $url }}</a></li>
+ @endforeach
+ </ul>
+ </div>
+ @endif
+ </div>
+ @endif
+
+ <!-- Error Messages -->
+ @if($errors->any())
+ <div style="background-color: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; padding: 10px; margin-bottom: 15px;">
+ <ul>
+ @foreach($errors->all() as $error)
+ <li>{{ $error }}</li>
+ @endforeach
+ </ul>
+ </div>
+ @endif
+
+ <div class="widget">
+ <!-- Upload Form (Works without JS) -->
+ <form id="uploadForm"
+ action="{{ route('files.upload') }}"
+ method="POST"
+ enctype="multipart/form-data">
+ @csrf
+
+ <div style="margin-bottom: 15px;">
+ <label for="files" style="display: block; margin-bottom: 5px;">
+ <strong>Choose Files</strong>
+ </label>
+ <input type="file"
+ name="files[]"
+ id="files"
+ multiple
+ accept=".{{ implode(',.', $allowedExtensions) }}"
+ style="width: 100%; padding: 5px;">
+ <p style="font-size: 0.85em; color: #525252; margin-top: 5px;">
+ <strong>Max size:</strong> {{ $maxSizeMB }}MB per file<br>
+ <strong>Max files:</strong> {{ $maxFiles }}<br>
+ <strong>Allowed types:</strong> {{ implode(', ', $allowedExtensions) }}
+ </p>
+ </div>
+
+ <!-- Progress bar (hidden initially, shown by JS) -->
+ <div id="uploadProgress" style="display: none; margin-bottom: 15px;">
+ <div style="width: 100%; background-color: #ddd; height: 20px; border: 1px solid #999;">
+ <div id="progressBar" style="width: 0%; background-color: #4CAF50; height: 100%;"></div>
+ </div>
+ <p id="progressText" style="font-size: 0.85em; margin-top: 5px;"></p>
+ </div>
+
+ <button type="submit" style="padding: 8px 16px; background-color: #333; color: #fff; border: none; cursor: pointer;">
+ Upload
+ </button>
+ </form>
+ </div>
+
+ <!-- Results container for AJAX uploads -->
+ <div id="uploadResults" style="display: none;"></div>
+</section>
+
+<footer>
+ <p>Last updated December 28th, 2025</p>
+</footer>
+
+@endsection
+
+@section('scripts')
+@vite(['resources/js/chunked-upload.js'])
+@endsection