Reader Stacks

TOPIC

File Uploads & Media

Uploading, previewing, and storing images and files.

Uploading Multiple Files in Angular

The multiple attribute on a file input is the easy part — looping through the resulting FileList and appending each file to FormData under a repeated key is what a backend actually needs to receive them all.

Compressing Images on Upload in Laravel

Reducing an uploaded image's file size without resizing it, using Intervention Image — and why compression quality and visual quality are not the same tradeoff for every image.

Generating Multiple Image Thumbnail Sizes in Laravel

Creating several resized versions of an uploaded image on the fly with Intervention Image — a small thumbnail, a medium preview, and the original — and why doing this at upload time beats resizing on every request.

Angular File Upload With FormData

File inputs in Angular are uncontrolled — you read the selected File object off a change event, then hand it to the browser's FormData API before sending it with HttpClient.