thats the current downloaddelegate. it worked for smaller downloads. I now implemented a workaround that doesn‘t include the context menu anymore and also works for large downloads. but it doesnt get triggered when the context menu item is used. even a custom context menu item didn’t trigger anything I could see
class DownloadDelegate: NSObject, WKDownloadDelegate {
func download(_ download: WKDownload, decideDestinationUsing response: URLResponse, suggestedFilename: String) async -> URL? {
if let downloadsURL = FileManager.default.urls(for: .downloadsDirectory, in: .userDomainMask).first {
let url = downloadsURL.appendingPathComponent(suggestedFilename)
return url
}
return nil
}
}