I am guessing asset-admin is doing something clever to overwrite this


Although it looks like DBFile::scaffoldFormField() returns null


@Conan looks like you should be hitting this line:

Show 1 attachment(s)

SilverStripe Framework, the MVC framework that powers SilverStripe CMS - silverstripe/silverstripe-framework

Hide attachment content

How is $fieldClass set? Maybe there is a config setting or something that could globally change this?


@Mo Yea this seems to work alright, however I can't seem to override the default scaffolded UploadFields, but if I have done UploadField::create(..) in my data objects' getCMSFields then they get the new CustomUploadField form field. It would be nice to force all data objects which have a has_one => Image::class || File::class to use this new upload field by default. But I don't have so many data objects, so I can survive without that 😄 Update: the default form scaffolder does not create form fields using ::create() it uses new -> $hasOneField = new $fieldClass($fieldName); unlucky 😐


Hmm I need to increase the php max memory limit before a file is uploaded through the CMS UploadField, does anyone here know about any hooks I can use which are called before the actual upload process occur?

One solution I can think of is creating a custom UploadField class which extends UploadField and then tell the Injector to always use the custom class. In the custom class I could then override the upload method and set the new php max memory limit there, before the upload process begins.. is there a more clean solution though 🤔


@mike_henden this is normal - as with git clone if the (optional) argument to give a name to the project is omitted (composer create-project from/package $PROJECT_NAME) then it'll use the one from the name of the package it's using to create the project with.

✔️ (1)

Had an odd thing happen yesterday — I was starting build on new site so I ran the Silverstripe Installer:

composer create-project silverstripe/installer

… pointing at a directory I had already set up. After configuration I noticed that the URL on my dev site looked a bit odd. So I checked the files and found my configured site was inside a folder called installer??

Never seen this before?!!