PHPackages                             nathancox/sortableuploadfield - 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. nathancox/sortableuploadfield

ActiveSilverstripe-module

nathancox/sortableuploadfield
=============================

A subclass of UploadField that allows for sorting the managed files.

1.1.0(9y ago)93.4k6[2 issues](https://github.com/nathancox/silverstripe-sortableuploadfield/issues)BSD-3-ClauseScheme

Since Nov 24Pushed 9y ago2 watchersCompare

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

READMEChangelog (2)Dependencies (1)Versions (2)Used By (0)

SilverStripe Sortable Upload Field Module
=========================================

[](#silverstripe-sortable-upload-field-module)

This module creates a subclass of UploadField that allows for sorting the managed files.

Also changes the upload interface which is heavily inspired by the more complete but use-specific Gallery module ().

Still in development.

Maintainer
----------

[](#maintainer)

Nathan Cox ()

Requirements
------------

[](#requirements)

SilverStripe 3.0+

Installation Instructions
-------------------------

[](#installation-instructions)

Via composer:

```
composer require nathancox/sortableuploadfield

```

Or manually download the module and place it in a folder in your site root.

Visit yoursite.com/dev/build

Usage
-----

[](#usage)

By default the field will use the File's Sort attribute for sorting. You'll need to make a subclass of File or Image to give it a sort field and $default\_sort:

```
class SlideshowImage extends Image {
	static $default_sort = 'Sort ASC';

	static $db = array(
		'Sort' => 'Int'
	);
	static $has_one = array(
		'Page' => 'Page'
	);
}
```

And in the page:

```
	...

	private static $has_many = array(
		'Slides' => 'SlideshowImage'
	);

	public function getCMSFields() {
		$fields = parent::getCMSFields();

		$fields->addFieldToTab('Root.Slides', $field = SortableUploadField::create('Slides', 'Slides'));

		return $fields;
	}

	...
```

This will produce

[![example sortableuploadfield](https://camo.githubusercontent.com/29a1114d3baf7a8c21af2cd2213614463463be7793e6e5eccf43958a17e4c294/687474703a2f2f7374617469632e666c79696e676d6f6e6b65792e636f2e6e7a2f6769746875622f73696c7665727374726970652d736f727461626c6575706c6f61646669656c642f736f727461626c6575706c6f61646669656c642d312e706e67)](https://camo.githubusercontent.com/29a1114d3baf7a8c21af2cd2213614463463be7793e6e5eccf43958a17e4c294/687474703a2f2f7374617469632e666c79696e676d6f6e6b65792e636f2e6e7a2f6769746875622f73696c7665727374726970652d736f727461626c6575706c6f61646669656c642f736f727461626c6575706c6f61646669656c642d312e706e67)

You can change the name of the sort attribute with `$sortableField->setSortField('SortOrderOrWhatever');`

Known Issues
------------

[](#known-issues)

[Issue Tracker](https://github.com/nathancox/silverstripe-sortableuploadfield/issues)

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3453d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7180a8cd979165ae26632d1b0145cd4f720c5a4946692231009995b103897a2b?d=identicon)[nathancox](/maintainers/nathancox)

---

Top Contributors

[![nathancox](https://avatars.githubusercontent.com/u/194315?v=4)](https://github.com/nathancox "nathancox (13 commits)")

---

Tags

silverstripefilescmsuploadfield

### Embed Badge

![Health badge](/badges/nathancox-sortableuploadfield/health.svg)

```
[![Health](https://phpackages.com/badges/nathancox-sortableuploadfield/health.svg)](https://phpackages.com/packages/nathancox-sortableuploadfield)
```

###  Alternatives

[bummzack/sortablefile

An extension for SilverStripe that adds sorting to UploadField.

70622.7k54](/packages/bummzack-sortablefile)[unclecheese/dropzone

An HTML5 upload field for the CMS and frontend forms.

46130.7k6](/packages/unclecheese-dropzone)[sunnysideup/ecommerce

Silverstripe E-commerce Application

257.2k79](/packages/sunnysideup-ecommerce)

PHPackages © 2026

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