This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
When i try to upload a csv file to assets folder from dashboard, The error pops up and denies the file type. It says
Error uploading file "test.csv": Only the following file types are allowed: jpg, jpeg, bmp, png, gif, css, js, woff, svg, ttf, eot, json, md, less, sass, scss".
It seems not support csv extension. Can I store csv files anywhere else?
Last updated
Hello! info2940.
Of the following files:
\[october directory]\modules\cms\widgets\AssetList.php
/**
* @var array A list of default allowed file types.
* This parameter can be overridden with the cms.allowedAssetTypes configuration option.
*/
public $allowedAssetTypes = ['jpg','jpeg','bmp','png','gif','css','js','woff','svg','ttf','eot','json','md','less','sass','scss'];
Please edit the above variables.
Directly editing modules\cms\widgets\AssetList.php
is a bad idea. It will get overwritten on the next update (potentially).
From the docs shown in that file, it says to override the allowed file types by adding a the info to the cms.php config file.
So basiccally, edit your app/config/cms.php
file and add something like the following to the bottom:
'allowedAssetTypes' => ['jpg','jpeg','bmp','png','gif','css','js','woff','svg','ttf','eot','json','md','less','sass','scss'],
Hellow that0n3guy!
Aha! I did not know to be addressed in the next update. Thank you.
@tetsuya-takiguchi3373 , Please note, I wasn't saying this will be addressed/fixed in the next update. I was saying that editing CORE files like the cms module COULD be overwritten in any update.
1-5 of 5