Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

Adding .vcf to allowed extensions


Go to End


5 Posts   3258 Views

Avatar
repoman

Community Member, 6 Posts

28 April 2011 at 8:24pm

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!

Avatar
Invader_Zim

Community Member, 141 Posts

29 April 2011 at 1:11am

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

Avatar
repoman

Community Member, 6 Posts

29 April 2011 at 2:14am

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

Avatar
Invader_Zim

Community Member, 141 Posts

29 April 2011 at 2:50am

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

Avatar
repoman

Community Member, 6 Posts

1 May 2011 at 5:16am

Thanks!