File can not open when URL contains is % like following example.
File name: work12%Complete.jpg
URL: http://.../work12%Complete.jpg
I have try following option for this, But using this option set %25 instead of % , So file can not open in UIimage.
var strUrl:String! = documentDetails.value(forKey: "thumbURL") as! String
strUrl = strUrl.addingPercentEncoding(withAllowedCharacters:NSCharacterSet.urlQueryAllowed);
print(strUrl!);
imgView.setImageWith(URL(string: strUrl)!, placeholderImage: UIImage(named : "DefaultImage"));
Output: http://.../work12%25Complete.jpg
if pass value directly in url like follow then app crash when UIimage set this url.
imgView.setImageWith(URL(string: "http://.../work12%Complete.jpg")!, placeholderImage: UIImage(named : "DefaultImage"));
Note:- If i have removed % from file name then created url like http://.../work12Complete.jpg, it's working fine, But i want to solution for file name contains is %.