I'm using SilverStripe 4.
When I try to drag and drop a file into the SilverStripe upload field in the CMS, I get the following error:
File already exists at path: fundraising/c573871f03/DSCN9695-v2.JPG
I get the same error when I click on 'Browse' and add the file that way.
If a click on 'Add From Files'(inside the upload field) and then drag an image into the screen that appears, it will upload successfully. I can then click on 'insert' and publish the article with no problem. It's only dragging and dropping that doesn't want.
Below is my model
SectionChild.php
ennamespace {
use SilverStripe\AssetAdmin\Forms\UploadField;
use SilverStripe\Assets\Image;
class SectionChild extends Page {
private static $has_one = [
"HeaderImage" => Image::class
] ;
private static $owns = [
"HeaderImage"
];
public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Main', $headerImage = new UploadField('HeaderImage'), 'Content');
$headerImage->setFolderName($this->Title);
return $fields;
}
}
class SectionChildController extends PageController {
}
}
Thank you so much in advance!