Skip to content

Upload System

Justin Hopper edited this page May 20, 2026 · 1 revision

Upload System

MFM's upload system handles single and multi-file uploads with drag-and-drop support, and a full conflict resolution queue for name collisions.

Overview

MFM uses Dropzone.js for uploads, with AJAX-powered progress and a custom conflict resolution layer on top. When a file being uploaded, copied, or moved has the same name as an existing file, MFM surfaces a resolution dialog instead of silently failing or overwriting.

Uploading Files

Drag and Drop

Drag files directly onto the upload page drop zone. Multiple files are accepted. Progress is shown per file.

Browse Files Button

A prominent Browse Files button sits above the drop zone and opens the OS file picker immediately on click.

Why is this button needed? Browsers block programmatic file picker opens (.click() on a hidden input) due to security restrictions — they require a direct user gesture. The Browse Files button is a real button click, which satisfies this requirement without any JS workarounds.

URL Import

Files can be imported directly from a URL — paste the URL into the URL import field and MFM fetches and saves the file server-side.

Conflict Resolution

When an uploaded file has the same name as an existing file in the destination, MFM shows a conflict modal with three options:

Option What it does
Overwrite Replaces the existing file with the uploaded one
Rename Server auto-names the new file (file (1).jpg, file (2).jpg, etc.)
Cancel Skips this file, leaves the existing file untouched

This applies to:

  • Uploads — file being uploaded matches existing file name
  • Copy operations — file being copied matches a file in the destination
  • Move operations — file being moved matches a file in the destination

Upload Conflict Queue

When uploading multiple files simultaneously, name collisions are queued — not shown all at once. This prevents multiple conflict dialogs from appearing concurrently and locking the UI.

How the queue works:

  1. All files begin uploading immediately
  2. Conflicts are detected as each upload completes
  3. All non-conflicting files finish uploading first
  4. Conflict dialogs appear one at a time, in order
  5. You resolve each conflict before the next dialog appears

Batch Resolution — "Do This For All"

Each conflict modal includes a "Do this for all remaining conflicts" checkbox. When checked, your choice (Overwrite, Rename, or Cancel) is applied to every remaining conflict in the queue automatically — no more clicking through each one individually.

Choice + "Do this for all" Result
Overwrite All Every remaining conflict overwrites the existing file
Auto-name All Every remaining conflict gets a server-numbered name
Cancel All Every remaining conflict is skipped

Copy and Move Conflicts

Copy and move operations use the same conflict modal. If you try to copy or move a file to a directory that already contains a file with the same name, the Overwrite / Rename / Cancel dialog appears before the operation completes.

Permission denied on move: If a move fails due to permissions, MFM identifies which path caused the failure (source directory, destination directory, or destination file) and appends (Permission denied) to the error message — rather than a generic "move failed" with no indication of why.

Related

Clone this wiki locally