File upload workflows need more than a button

Define acceptable files, processing states and access rules so uploads become dependable parts of the workflow.

Memory card reader connected to a laptop showing an upload preview.

A file upload creates several expectations at once: the file arrived, it belongs to the right record, someone can open it and the intended people can access it. A useful business workflow makes those stages visible. Begin with the actual files customers or staff need to supply, then set the format, size, access and processing rules around that purpose.

Explain what a successful upload means

Consider a Townsville construction supplier collecting site photographs and specifications. A customer selecting a file is not the same as the server receiving it, and receipt is not necessarily the same as approval for use. Show progress and a clear final state. If processing or review is required, label that stage separately. Give the file a recognisable display name and connect it to the relevant order or site. Let the user correct an accidental upload through an appropriate workflow instead of requiring an informal email to explain which file should be ignored.

Validate at the trusted boundary

OWASP recommends layered file-upload controls and warns against trusting the supplied content type by itself. The application should enforce the agreed restrictions on the server, not only in the browser's file picker. Choose permitted formats based on what the business genuinely needs, and apply appropriate checks and storage isolation. Avoid presenting a security implementation detail as a burden the customer must diagnose. A rejected upload should explain the useful requirement, such as an accepted file type or maximum size, and offer a clear next action.

Keep document access attached to the record

The people who may see a job should not automatically be assumed to have identical access to every attached document. Identify any more restricted categories and apply permissions to downloads as well as the page listing the files. Decide whether a replacement creates a new version or removes the previous item. A final approved specification needs a different treatment from a temporary reference photograph. Give staff a way to identify the current file without depending on inconsistent filenames such as final-new-revised that customers may supply.

Rehearse an interrupted and incorrect upload

Test a large permitted file, an unsupported format, a duplicate name and a connection interrupted partway through. Confirm that the result is understandable and that incomplete files cannot be mistaken for ready documents. Review:

  • Accepted formats, size limits and any processing or review stage.
  • The link between each file, its record and its allowed readers.
  • How replacements and superseded versions are labelled.
  • The customer recovery route when a file cannot be uploaded or processed.

Further reading

Discuss your software project with 110s

Related Insight