Learning / Web Basics / Chapter 3
File Storage
Where files live, from the server’s own disk to cloud buckets
Local disk, SFTP, object storage like Amazon S3, block storage and network shares: how they work, how they differ, and which one fits which use case.
Beginner · 9 slides · 8 min
Where do the files go?
Images, PDFs, videos and backups don’t belong in database tables. The database keeps a reference, and the file lives in a storage.
The server’s own disk
Saving files in a folder on the web server is simple and fast, until there is more than one server.
SFTP: moving files between systems
SFTP transfers files over an encrypted SSH connection. It is the classic for automated file exchange between companies.
Object storage: Amazon S3 & co.
Files are objects in a bucket, addressed by a key and accessed over HTTP. Practically unlimited, very durable, pay per use.
Block storage and network shares
Virtual hard disks for single servers and shared folders for many, mostly working under the hood.
The options compared
Access, sharing, scaling, cost and best use: local disk, SFTP, object storage and network shares side by side.
Which storage for which job?
Pick a use case and see which storage fits and why.
Check yourself
Where should uploaded files go when your app runs on two servers?
Recap
Local disk, SFTP, object storage and network shares: the storage basics in five sentences.