Jump to:

23007 Posts in 11866 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Adding .vcf to allowed extensions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1975 Views
  • repoman
    Avatar
    Community Member
    6 Posts

    Adding .vcf to allowed extensions Link to this post

    Helo

    I get a "403 Forbidden Error" for my link to a .vcf file in my "assets/Uploads" folder.

    Seems like SilverStripe doesn't allow .vcf files. Does anyone know how I can add the .vcf ending to the allowed extensions?

    Thanks!

  • Invader_Zim
    Avatar
    Community Member
    141 Posts

    Re: Adding .vcf to allowed extensions Link to this post

    Hi repoman,

    i've done that by adding this to my mysite/_config.php:

    // Allow usage of .vcf files by adding 'vcf to the $allowed_extensions array
    File::$allowed_extensions[] = 'vcf';

    Also make sure to to add vcf to the .htaccess file in your assets directory.

    Cheers
    Christian

  • repoman
    Avatar
    Community Member
    6 Posts

    Re: Adding .vcf to allowed extensions Link to this post

    Hi Christian

    Thanks!

    I can't figure out how to add vcf to the .htaccess file in my assets directory. How did you do it?

    I tried to add this to the .htaccess file in my "mysite" folder:

    <Directory /html/www/cms/assets/>
    AddType text/x-vcard .vcf
    </Directory>

    and created a .htaccess file in my assets directory and added this:

    AddType text/x-vcard .vcf

    Either way I failed.

    Thanks! repoman

  • Invader_Zim
    Avatar
    Community Member
    141 Posts

    Re: Adding .vcf to allowed extensions Link to this post

    Hi,

    i think there's no need to edit the .htaccess in the mysite directory.

    I've copied and pasted my assets/.htaccess to here: http://pastie.org/1843569

    Cheers
    Christian

  • repoman
    Avatar
    Community Member
    6 Posts

    Re: Adding .vcf to allowed extensions Link to this post

    Thanks!

    1975 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.