diff --git a/src/DropzoneFile.php b/src/DropzoneFile.php index 96220a1..8eb98fd 100644 --- a/src/DropzoneFile.php +++ b/src/DropzoneFile.php @@ -83,7 +83,7 @@ public function getPreviewThumbnail($w = null, $h = null) */ protected function getFilenameForType($ext, $size) { - return ModuleResourceLoader::singleton()->resolveResource(sprintf( + return ModuleResourceLoader::singleton()->resolveURL(sprintf( 'unclecheese/dropzone:images/file-icons/%spx/%s.png', $size, strtolower($ext) diff --git a/src/FileAttachmentField.php b/src/FileAttachmentField.php index be368f7..ddea293 100644 --- a/src/FileAttachmentField.php +++ b/src/FileAttachmentField.php @@ -1139,7 +1139,7 @@ public function AttachedFiles() public function RootThumbnailsDir() { return $this->getSetting('thumbnailsDir') ?: - ModuleResourceLoader::singleton()->resolveResource('unclecheese/dropzone:images/file-icons'); + ModuleResourceLoader::singleton()->resolveURL('unclecheese/dropzone:images/file-icons'); } /** diff --git a/src/FileAttachmentFieldTrack.php b/src/FileAttachmentFieldTrack.php index 5894252..c032e9e 100644 --- a/src/FileAttachmentFieldTrack.php +++ b/src/FileAttachmentFieldTrack.php @@ -2,6 +2,7 @@ namespace UncleCheese\Dropzone; +use SilverStripe\Assets\File; use SilverStripe\Control\Controller; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataObjectInterface; @@ -20,7 +21,7 @@ class FileAttachmentFieldTrack extends DataObject ); private static $has_one = array( - 'File' => 'File', + 'File' => File::class, ); private static $table_name = 'FileAttachmentFieldTrack';