Save contact Info (vcf file) into mobile phone

Hello,
I’m looking for a way to save a vCard (vcf file) in a mobile device (Android or Iphone) with Wix.
Since i can’t save this kind of file in the DB, does anyone knows how can i do it?

1 Like

I have a workaround that I used to host a vcf / vcard on my wix site, since wix can’t do it natively (which is pretty annoying). Pretty simple actually. It involves creating a hidden webpage in Wix and then forwarding that page to your VCF file, which is hosted elsewhere.

First, upload your vcf file to whatever cloud storage you use (dropbox, onedrive, etc.), share it so it is publicly available and copy the access URL. Then create a new page on your wix site, hide it from your navigation and turn off SEO/search access (both options found in the page settings section). You may also want to add some text to your page saying “your vcard is now loading” or something similar.

Make sure Corvid code is turned on for your site (should be a menu option to enable Corvid). In the Wix editor, view your newly-created page and drag up from the bottom of the screen to reveal the code window. Assuming you have no other code running for this page, here is what your code section should look like:

// For full API documentation, including code examples, visit http://wix.to/94BuAAs
import wixLocation from 'wix-location';
$w.onReady( function() {
wixLocation.to("access URL of hosted file");
}) ;

Then publish your page and use the URL of the wix page when you want to access or send your vcard. You can also create a QR code with the URL of the hidden Wix page, which will automatically forward to your vcard. And if you want to change your vcard, just upload a new file to your cloud storage service, note the new URL and update the Corvid code on your Wix page. Any QR codes or links you have given out previously will still be valid.

1 Like

@egurry is there then a way to email/text this card to someone from thier mobile device…
So I have a webpage and someone is looking at it in mobile view… I create a button that says “Share my contact info” and when someone presses the button, it sends an email with my contact info?

I am no Corvid expert, so I can’t help you with sending an email. But you could certainly have a button on a webpage that links to the hidden page described above, which would initiate the direct download of the vCard. Might be better to create a new post if you want to figure out how to get your website to send an email with a vCard attachment when someone fills in their email address and clicks Submit.

1 Like

@egurry thanks… how do I link the hidden page to the dropbox vcard file?

So far I have this…

Delete all of lines 1, 2 and 3.

Imports should be at top followed by your onReady function, of which you can only have the one.

WixLocation can only be from ‘wix-location’ and simply change the ‘your url’ to what you already have for your wixLocation.to line.

import wixLocation from ‘wix-location’;

$w.onReady( function() {
wixLocation.to (“yoururlhere”);
}) ;

For whoever wants it added maybe in the future to Wix, then go request it here.
https://support.wix.com/en/article/request-vcf-file-support

givemeawhisky , thanks for the code cleanup. But are you sure there isn’t an extra “.to” in your 3rd line of code above? Also, FWIW, I can confirm that my original code (which contains the extra line “import wixLocation from ‘wix-location’;”) is working fine.

1 Like

Yes you are right, I’ll change it now, thanks. I will blame the forum itself as it likes duplicating some parts of code when you put it in a code block :wink:

It is the forum duplicating it, just went to edit it and on unpublished version it is fine and yet when publish it, the forum duplicates it again.

Anyways, thanks for the original workaround too.

Hey all, appreciate the work around however i seem to be running into an issue.
Any help would be handy.

Code currently looks like:

import wixLocation from 'https://www.hillierplumbingandgas.com/test1';
$w.onReady (function () {
wixLocation.to("https://drive.google.com/open?id=1VJz1RvSUiq9cufRQCBqW5TXdp4R21TGf");
});

I suspect its the first lines wixLocation but would like some clarification.

Images attached for reference

I think it should look like the code below (although I’m guessing that givemeawhisky would use a more direct structure). But your Google Docs link doesn’t point to a v-card, FYI.

// For full API documentation, including code examples, visit http://wix.to/94BuAAs
import wixLocation from 'wix-location';
$w.onReady( function() {
wixLocation.to("https://drive.google.com/open?id=1VJz1RvSUiq9cufRQCBqW5TXdp4R21TGf");
}) ; 

Hi i have got this working but when the click the button it takes them to onedrive where they have to then open the file in contacts. Can i make it so it automatically puts it into contacts?

Yes, that is how mine works as well. Seems to be the best we can do.