                     let group = DispatchGroup()
                     group.enter()
                     
-                    if avAsset.isExportable, let exportSession = AVAssetExportSession(asset: avAsset, presetName: self.videoExportPreset) {
+                    if avAsset.isExportable, let exportSession = AVAssetExportSession(asset: avAsset, presetName: self.configuration.videoExportPreset) {
                         let fileManager = FileManager.default
                         let tempFilePath = asset.localTemporaryPath!.path + "~"
                         let tempFile = URL(fileURLWithPath: tempFilePath)

            }
            
            if asset.type == .photo {
                fileName = fileName + String(self.imageExportPreset.rawValue)
            } else {
                fileName = fileName + self.videoExportPreset + self.avOutputFileType.rawValue
            }
        } else {
            fileName = "\(Date().timeIntervalSince1970)"
        }
        
        if !FileManager.default.fileExists(atPath: self.exportDirectory.path) {
            try? FileManager.default.createDirectory(at: self.exportDirectory, withIntermediateDirectories: true, attributes: nil)
        }
        
        DKImageAssetDiskPurger.sharedInstance.addDirectory(self.exportDirectory)
        
        return self.exportDirectory.appendingPathComponent(fileName)
    }
    
    static let ioQueue = DispatchQueue(label: "DKPhotoImagePreviewVC.ioQueue")

}

/*
 Configuration options for an DKImageAssetExporter.  When a exporter is created,
 a copy of the configuration object is made - you cannot modify the configuration
 of a exporter after it has been created.
 */
@objc
public class DKImageAssetExporterConfiguration: NSObject, NSCopying {
    
    @objc public var imageExportPreset = DKImageExportPresent.compatible
    
