feat(server): add multipart upload endpoint with box IDs
- Add POST /upload to accept multipart file uploads - Generate random box IDs and persist files under data/uploads/<boxID> - Sanitize and deduplicate filenames to avoid invalid paths/collisions - Return box metadata and saved file details in the response - Add Win98-style upload UI styling to support the new flowfeat(server): add multipart upload endpoint with box IDs - Add POST /upload to accept multipart file uploads - Generate random box IDs and persist files under data/uploads/<boxID> - Sanitize and deduplicate filenames to avoid invalid paths/collisions - Return box metadata and saved file details in the response - Add Win98-style upload UI styling to support the new flow
This commit is contained in:
@@ -10,11 +10,56 @@
|
||||
|
||||
<body>
|
||||
<main>
|
||||
<section class="upload-window" aria-labelledby="upload-window-title">
|
||||
<header class="upload-titlebar">
|
||||
<h1 id="upload-window-title">WarpBox Upload</h1>
|
||||
<div class="upload-window-controls" aria-hidden="true">
|
||||
<span class="upload-control">_</span>
|
||||
<span class="upload-control">□</span>
|
||||
<span class="upload-control">×</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
<form class="upload-form" action="/upload" method="post" enctype="multipart/form-data">
|
||||
<div class="upload-menu" aria-hidden="true">
|
||||
<span>File</span>
|
||||
<span>Edit</span>
|
||||
<span>View</span>
|
||||
<span>Help</span>
|
||||
</div>
|
||||
|
||||
<div class="upload-panel">
|
||||
<label class="upload-dropzone" for="file-upload">
|
||||
<span class="upload-icon" aria-hidden="true"></span>
|
||||
<span class="upload-primary">Drop file here</span>
|
||||
<span class="upload-secondary">or click Browse to choose one</span>
|
||||
</label>
|
||||
|
||||
<input id="file-upload" class="upload-input" type="file" name="files" multiple>
|
||||
|
||||
<div class="upload-details">
|
||||
<span class="upload-detail-label">Selected Files</span>
|
||||
<span id="upload-file-count" class="upload-file-count">0 files</span>
|
||||
</div>
|
||||
|
||||
<div class="upload-file-list" aria-live="polite" aria-label="Selected files">
|
||||
<p class="upload-empty-state">No files selected</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="upload-actions">
|
||||
<label class="win98-button" for="file-upload">Browse...</label>
|
||||
<button class="win98-button" type="submit">Upload</button>
|
||||
</footer>
|
||||
|
||||
<div class="upload-statusbar" aria-live="polite">
|
||||
<span>Ready</span>
|
||||
<span>WarpBox</span>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<script src="/static/js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user