hamishcampbell/silverstripe-securefiles — Issue #6: Wrong database-field for "Filename"
Author: oliverschneider
Created: 2012-02-20 11:19:23+00:00
State: open

Using the "Filename"-Field from the database results in changed filenames on download, within this field SilverStripe stores the whole path

> assets/Uploads/SilverStripe.png

so on download what you get will be named

> assets-uploads-silverstripe.png

Used field should be "Name" instead of "Filename", so the old code of SecureFilesController.php looks like

```php
function fileFound(File $file, $alternate_path = null) {

// File properties
$file_name = $file->Filename;
......
}
```

but should be

```php
function fileFound(File $file, $alternate_path = null) {

// File properties
$file_name = $file->Name;
......
}
```