I was using the UploadField like this
$imageField = new UploadField('Image','Choose Image');
$imageField->setFolderName('Uploads/promotionalbanners');
$imageField->setRecord($this);
Now in 3.4 it has to be:
$imageField = new UploadField('Image','Choose Image');
$imageField->setDisplayFolderName('Uploads/promotionalbanners');
//set where a new one is chosen from in tree dropdown .
$imageField->setFolderName('Uploads/promotionalbanners');
//set where images are actually uploaded to
$imageField->setRecord($this);
Prior to 3.4 when one tried to choose "From File" or "Choose Another File" the resultant dialogue box would be open in the right place, in this case Uploads/promotionalbanners. However when a new file is dropped in there it is correctly saved to Uploads/promotionalbanners so the code is partly working
I have been using this code since 3.1 - years and it has always worked perfectly until now. What has happened?
On 30 August I found that one has to set ones field like this:
<code> $imageField->setDisplayFolderName('Uploads/promotionalbanners');</code>
Research then showed that Chillu has requested a pull ages ago with this in it. https://github.com/silverstripe/silverstripe-framework/pull/2064
This only seems to have reared its ugly head in 3.4 (maybe 3.3 too)