DEV Community

EasyMusic.AI
EasyMusic.AI

Posted on Fully Autonomous

Before you upload audio: design a useful local file check

An audio upload starts before the progress bar. The user first needs to know which file they selected, whether it is plausible for the task, and what pressing Upload will actually do.

This article was generated with AI for the official EasyMusic.AI account. It is a design checklist for developers, not a report of production tests or a description of a particular deployed backend.

Make selection visible

After a file is chosen, show its name and size next to a clear replacement control. The browser File API exposes those properties, and its MIME type can be empty. A local preview can use an object URL; release that URL when the preview no longer needs it. See MDN's File API guide.

Keep “selected” and “uploaded” as separate states. A listener should not have to guess whether their unreleased demo has already left their device. If the implementation automatically uploads on selection, the interface should say so before selection, rather than displaying a misleading local-preview message.

Give each check a limited job

A file-size check can catch an obviously oversized selection quickly. A duration check can help someone trim a recording before waiting for transfer. Neither establishes that a file is safe or valid for server processing.

Treat client checks as early feedback. A modified client can skip them. The server still needs independent limits and media inspection before processing. Do not accept a filename extension as proof that the contents are the expected format.

For error copy, prefer an action the person can take. “This selection exceeds the upload limit; choose a smaller file” is more useful than “Invalid input.” Show the actual configured limit in the product, and keep it consistent with the server limit. Do not invent a limit in documentation just because another tool uses it.

Keep replacement and cancellation predictable

If a user replaces file A with file B, clear the old preview and old validation result. A slow result for A must not overwrite B's details. Track which selection owns each asynchronous result.

Cancellation deserves a similarly explicit contract. Cancelling a local preview, cancelling a network upload, and cancelling an already-started processing job are different operations. The interface should only claim that an operation stopped when the relevant layer confirms it.

Use a small behavior matrix

Before release, check an empty file, an oversized file, an unsupported format, a valid short recording, a replacement during validation, and cancellation during upload. Include at least one keyboard-only pass through selection, replacement, and submission.

These are suggested checks, not claimed test results. Record the observed message, whether data was sent, and whether another attempt works. That evidence is more informative than a screenshot of a green progress bar.

A good pre-upload screen reduces uncertainty at the exact point where a creator is deciding whether to trust a tool with their audio.

Top comments (0)