PHPackages                             jamesbolitho/silverstripe-frontenduploadfield - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. jamesbolitho/silverstripe-frontenduploadfield

ActiveSilverstripe-vendormodule[File &amp; Storage](/categories/file-storage)

jamesbolitho/silverstripe-frontenduploadfield
=============================================

Frontend UploadField for SilverStripe 4 with Dropzone.js

66.1k8PHP

Since Dec 18Pushed 2y ago2 watchersCompare

[ Source](https://github.com/jamesbolitho/silverstripe-frontenduploadfield)[ Packagist](https://packagist.org/packages/jamesbolitho/silverstripe-frontenduploadfield)[ RSS](/packages/jamesbolitho-silverstripe-frontenduploadfield/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Frontend Uploadfield
====================

[](#frontend-uploadfield)

Frontend UploadField for SilverStripe 4 with Dropzone.js. jQuery is also required to be included in your front end template.

Installation
------------

[](#installation)

```
composer require jamesbolitho/silverstripe-frontenduploadfield

run /dev/build

```

Field Configuation
------------------

[](#field-configuation)

To use this field use:

```
use jamesbolitho\frontenduploadfield\UploadField;

```

Create your field as normal in your form:

```
$upload1 = UploadField::create('Images', 'Images');

```

Set upload folder:

```
$upload1->setFolderName("Uploads/my-upload-folder/");

```

Set allowed file types:

```
$upload1->getValidator()->setAllowedExtensions(array('jpg','jpeg','gif'));

```

Set allowed max file size:

```
$sizeMB = 1; // 1 MB
$size = $sizeMB * 1024 * 1024; // 1 MB in bytes
$upload1->getValidator()->setAllowedMaxFileSize($size);

```

Set to allow files to be removed from upload field:

```
$upload1->setRemoveFiles(true);

```

*Please note that this also removes files from assets as well.*

For this remove files function to work a key is generated and saved in the database for each file that is uploaded through the front end upload fields. This is to provide a more secure way of identifying your files from front end forms. To remove this key after uploading you can add the following to your form submission processing function for example:

```
foreach($data["Images"]["Files"] as $id) {
	if($file = File::get()->byID((int) $id)) {
		$file->removeFrontEndUploadKey();
	}
}

```

Set to allow multiple file upload:

```
$upload1->setIsMultiUpload(true);

```

Set allowed number of files to upload:

```
$upload1->setAllowedMaxFileNumber(5);

```

Set timeout for the XHR requests in milliseconds:

```
$upload1->setTimeout(30000);

```

ToDo's:
-------

[](#todos)

- Add ability to alter more Dropzone settings programmatically through Silverstripe
- Add chunk upload.
- Add more icons for non image files e.g. pdf, word etc.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

Top contributor holds 86.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f5d8ebdecdf968729ec7aedb51d418910b2172542da456ac986ded7fcf244d3e?d=identicon)[james-bolitho](/maintainers/james-bolitho)

---

Top Contributors

[![jamesbolitho](https://avatars.githubusercontent.com/u/362607?v=4)](https://github.com/jamesbolitho "jamesbolitho (26 commits)")[![mlewis-everley](https://avatars.githubusercontent.com/u/687143?v=4)](https://github.com/mlewis-everley "mlewis-everley (2 commits)")[![jinjie](https://avatars.githubusercontent.com/u/2721195?v=4)](https://github.com/jinjie "jinjie (1 commits)")[![Makreig](https://avatars.githubusercontent.com/u/6011781?v=4)](https://github.com/Makreig "Makreig (1 commits)")

### Embed Badge

![Health badge](/badges/jamesbolitho-silverstripe-frontenduploadfield/health.svg)

```
[![Health](https://phpackages.com/badges/jamesbolitho-silverstripe-frontenduploadfield/health.svg)](https://phpackages.com/packages/jamesbolitho-silverstripe-frontenduploadfield)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
