I am encountering difficulties when trying to download a vCard on iPhone Chrome. I am making an API call from the href link which is supposed to return a .vcf file for downloading the vCard. This functionality works seamlessly on desktop browsers such as IE, Chrome, and Firefox, as well as on iPhone Safari and Samsung Chrome. However, when attempting to download on Chrome for iPhone, it throws an exception, as shown in the provided image: https://i.sstatic.net/ezc9A.jpg
The API linked to the href is structured as follows: GET:
The code responsible for returning the vCard's .vcf file looks similar to this:
var vCard = BuildVCard(profile, profileUrl); vCard returns a Vcard
return new FileActionResult( new StringContent(vCard.ToString()), "text/vcard", CreateVCardFileName(profile));
CreateVCardFileName returns a string.Format("{0}.vcf", fileName);
The entities displayed in the Fiddler headers indicate something like this:
Content-Disposition: attachment; filename=Uma.vcf Content-Type: text/vcard
Is this issue related to iOS-Chrome compatibility? Do I need to include any additional configurations or specific MIME types for successful vCard downloads?
Thank you for your assistance and time.