Skip to content

Articles

Working guides to handling file uploads in PHP — the configuration that trips people up, the security decisions that matter, and the techniques behind a modern upload experience. Every example is plain PHP you can use without our component.

How to Upload Multiple Files in PHP

Handling the $_FILES array when a form posts several files at once, and the pitfalls of its unusual shape.

· 8 min read

PHP Upload Size Limits Explained

upload_max_filesize, post_max_size, memory_limit and the web-server caps that silently override them.

· 9 min read

PHP Upload Error Codes (UPLOAD_ERR_*)

Every value $_FILES['file']['error'] can hold, what actually causes it, and how to fix it.

· 7 min read

Secure File Uploads in PHP: A Checklist

Extension allow-lists, MIME verification, storage outside the web root, and the mistakes that lead to remote code execution.

· 11 min read

Uploading Large Files in PHP Without Timeouts

Why big uploads fail, how chunked transfer solves it, and what to do about memory and execution limits.

· 10 min read

Building an AJAX Upload with a Progress Bar

XMLHttpRequest upload events, FormData, and why fetch() still cannot report upload progress.

· 9 min read

Drag-and-Drop File Uploads in PHP

The DataTransfer API, a drop zone that works with the keyboard too, and wiring it to a PHP endpoint.

· 8 min read

PHP File Upload Not Working? A Checklist

Work down the causes in order: the form, the error code, PHP limits, the web server, permissions and the temp directory.

· 9 min read

Image Upload and Resize in PHP

Validating real images, resizing with GD, keeping transparency, fixing EXIF rotation and capping memory.

· 10 min read

PHP Upload Libraries Compared

Dropzone, Uppy, FilePond, Plupload and jQuery-File-Upload: licence, maintenance and what each is good at.

· 11 min read

Replacing jQuery-File-Upload

It is archived. How to audit what you are exposed to, and the migration options with working code.

· 10 min read

Dropzone.js Alternatives for PHP

When Dropzone is still right, when it is not, and how to write the drop zone yourself in thirty lines.

· 9 min read

Storing Uploaded Files: Database or Filesystem?

Filesystem with metadata rows, database BLOBs or object storage - the trade-offs, with working code for each.

· 9 min read

Where to start

If you are building an upload form from scratch, read multiple file uploads first for the shape of $_FILES, then the security checklist before you accept anything from real users. If something is already broken, the error-code reference and the size-limit guide between them explain almost every upload failure in PHP.

For the experience side — progress bars, cancellation, drag-and-drop and files too large for a single request — see AJAX uploads with a progress bar, drag-and-drop uploads and large file uploads.