protected function processFile(DataObject $object, $field, $value, $class)
    {
        // Initialise:
        
        $source = null;
        $folder = null;
        
        // Detect Value Type:
        
        if (is_array($value)) {
            
            // Handle Array Value:
            
            $source = isset($value['Source']) ? $value['Source'] : null;
            $folder = isset($value['Folder']) ? $value['Folder'] : null;
            
        } else {
            
            // Handle String Value:
            
            $source = $value;
            
        }
        
        // Obtain Folder (if required):
        
        if (!$folder) {
            $folder = $this->getFolderName($object, $field);
        }
        
        // Obtain Source Path:
        
        $path = Director::getAbsFile($source);
        
        // Does Source Exist?
        
        if (file_exists($path)) {
            
            // Obtain Base Name:
            
            $basename = basename($path);
            
            // Define Asset Filename:
            
            $filename = sprintf('%s/%s', $folder, $basename);
            
            // Obtain or Create File:
            
            if (!($file = File::find($filename))) {
                $file = Injector::inst()->create($class);
            }
            
            // Define File Contents:
            
            $file->setFromLocalFile($path, $filename);
            
            // Write and Publish File:
            
            $file->write();
            $file->copyVersionToStage(Versioned::DRAFT, Versioned::LIVE);
            
            // Answer File ID:
            
            return $file->ID;
        }
    }