Home> Solution Center> Store documents and images

Where should a business web application store uploaded documents and images?

Business applications often need to store files together with records: contracts, invoices, inspection photos, scanned forms, employee documents, customer files, product images, or signed approvals.

The practical question is not just how to add an upload button. The real question is where those files should be stored, how users should access them, how backups should work, and what happens when storage requirements change later.

Quick answer: When building or rebuilding a business web application, uploaded files can be stored in the database, in a folder on the web server, or moved to cloud storage later. The best choice depends on file size, security, backup strategy, compliance requirements, and how closely files need to stay connected to database records.

Three common ways to store uploaded files

The right choice depends on file size, security, backup strategy, and how closely each file needs to stay connected to a database record.

Database

Best for small, controlled files that should be backed up together with the record.

  • Simple backup model
  • Files stay tied to records
  • Good for smaller attachments

Watch out: large files can make the database grow quickly.

Server folder

Best for larger files, many uploads, images, scans, and document-heavy applications.

  • Better for large files
  • Good for image-heavy apps
  • Database stores file references

Watch out: database and file folders must be backed up together.

Cloud storage

Best when storage needs to scale or files may later move to cloud providers.

  • Scalable storage
  • Useful for migration
  • Works well for growing apps

Watch out: review permissions, credentials, cost, and compliance requirements.

In PHPRunner, this storage decision is made when configuring file and image upload fields. Users still work with normal application pages; the storage method is handled behind the scenes.

Watch: storing documents and images in PHPRunner

This video shows the file-system approach, where uploaded documents and images are stored in a folder while the application keeps file information connected to database records.

Also useful: Store documents and images in the database.

How should sensitive files be protected?

Uploaded files can contain contracts, financial information, employee records, healthcare documents, customer data, or legal paperwork. Storage design should be part of the application’s security plan.

Control access

Users should only see files they are allowed to access. File permissions should follow the same logic as the rest of the application.

Limit uploads

Restrict allowed file types and file sizes. Business users usually need PDFs, documents, spreadsheets, and images — not executable files.

Use encryption where needed

PHPRunner Enterprise supports encryption features that can be used as part of a secure application design.

What if files need to move later?

File storage requirements often change. A project may start with server folders and later move to cloud storage. An older application may already have thousands of files on a hard drive. Another project may need to move files from database storage to a cloud provider.

Changing storage locations?

Use File Migration Manager

File Migration Manager helps move files between local hard drive, database storage, and cloud providers. Supported cloud providers include Google Drive, Dropbox, Amazon S3, Wasabi, and Microsoft OneDrive.

How does PHPRunner help?

Requirement PHPRunner option Resource
Upload files and images Use File/Image fields on Add and Edit pages. File/Image control
Store files in database or folders Choose database binary storage or server-folder storage. Upload settings
Handle multiple files Allow more than one uploaded file per field. Multiple file uploads
Resize images and create thumbnails Use built-in image options for thumbnails and resizing. Image settings
Restrict file size and file types Set maximum file size and allowed extensions for upload fields. Advanced file settings
Protect sensitive data Use permissions, secure hosting, HTTPS, and encryption where required. Encryption
Move files to another storage location Use File Migration Manager. File Migration Manager

FAQ

Is this article about adding uploads to an existing custom application?

Not exactly. This guide is mainly for teams building or rebuilding a business web application with PHPRunner. If you already have a custom PHP or ASP.NET application, adding upload functionality would usually be handled inside that existing codebase.

Can PHPRunner store uploaded files in the database?

Yes. PHPRunner can store uploaded files and images in database binary fields, or store them in a folder on the web server while keeping file information in the database.

Can uploaded images be resized automatically?

Yes. PHPRunner can create thumbnails and resize images during upload, which is useful for profile photos, product images, galleries, and inspection photos.

Is database storage or server-folder storage better?

Database storage is often better for smaller controlled files that should stay tightly connected to records. Server-folder storage is often better for larger files, image-heavy applications, and large numbers of uploads.

Which cloud providers does File Migration Manager support?

File Migration Manager supports Google Drive, Dropbox, Amazon S3, Wasabi, Google Cloud Storage, Azure Blob Storage, and Microsoft OneDrive.

Can uploaded data be encrypted?

PHPRunner Enterprise supports encryption features. Sensitive file and data storage should be reviewed as part of the overall application, database, server, and cloud-storage security design.

Build file and image upload workflows with PHPRunner

PHPRunner helps you build business web applications with file uploads, image handling, permissions, reports, dashboards, encryption options, and flexible storage choices.