- Posts: 61
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Manage more file extension in 2.05 rel
- achecchini
- Topic Author
- Offline
- Senior Member
Less
More
2 years 6 months ago #219994
by achecchini
Manage more file extension in 2.05 rel was created by achecchini
Hi community!
while I'm planning a version upgrade to 3.27. xx I have some surveys served by an old limesurvey 2.05 installation
recently we have the necessity to administer a survey with a link to .ppsx file stored in the survey local repository. But when try to upload the message "Denied file extension" is shown.
meny year ago, when started the setup installation, I change -if my memory is not in mistake- the config.php for manage some other file type (i.e. doc or docx, xls, pdf and others) but examinating today the config.php I didn't find any line with instructions for manage extensions and MIME types! or I didn't find this istructions where aspected to be! So I try to Search an old manual version, but I didn't find it.
Can someone address me to the correct way to configure lime to accept others file extensions in this old release of limesurvey?
Any help will be very appreciated!
Ago
while I'm planning a version upgrade to 3.27. xx I have some surveys served by an old limesurvey 2.05 installation
recently we have the necessity to administer a survey with a link to .ppsx file stored in the survey local repository. But when try to upload the message "Denied file extension" is shown.
meny year ago, when started the setup installation, I change -if my memory is not in mistake- the config.php for manage some other file type (i.e. doc or docx, xls, pdf and others) but examinating today the config.php I didn't find any line with instructions for manage extensions and MIME types! or I didn't find this istructions where aspected to be! So I try to Search an old manual version, but I didn't find it.
Can someone address me to the correct way to configure lime to accept others file extensions in this old release of limesurvey?
Any help will be very appreciated!
Ago
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12888
- Thank you received: 3965
2 years 6 months ago - 2 years 6 months ago #220021
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Manage more file extension in 2.05 rel
Maybe this helps.
In "config-defaults.php" you find
// Please be very careful if you want to allow SVG files - there are several XSS dangerous security issues
$config('allowedthemeimageformats') = 'gif,ico,jpg,png'; // Image file types allowed to be uploaded in the themes section.
$config('allowedthemeuploads') = 'css,js,map,json,eot,ttf,woff,txt,md,xml,woff2,twig'; // Other file types allowed to be uploaded in the themes section.
$config('allowedresourcesuploads') = '7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,ico,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,xml,zip,css,js'; // File types allowed to be uploaded in the resources sections, and with the HTML Editor
Replace the "(" and ")" by "[" and "]". I changed because this editor removed them.
Joffm
In "config-defaults.php" you find
// Please be very careful if you want to allow SVG files - there are several XSS dangerous security issues
$config('allowedthemeimageformats') = 'gif,ico,jpg,png'; // Image file types allowed to be uploaded in the themes section.
$config('allowedthemeuploads') = 'css,js,map,json,eot,ttf,woff,txt,md,xml,woff2,twig'; // Other file types allowed to be uploaded in the themes section.
$config('allowedresourcesuploads') = '7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,ico,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,xml,zip,css,js'; // File types allowed to be uploaded in the resources sections, and with the HTML Editor
Replace the "(" and ")" by "[" and "]". I changed because this editor removed them.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 2 years 6 months ago by Joffm.
The topic has been locked.
- achecchini
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
2 years 6 months ago #220028
by achecchini
Replied by achecchini on topic Manage more file extension in 2.05 rel
Hi Joffm! thanks as usual for your suggestions!
In an old thread I had read that changing config-default.php in not the best idea because the file is replaced every time you update the Lime release.
What do you think about that? This mean that the config-default.php must be edited everytime a release change is uploaded?
Thanks in advance for your gentle reply.
Have a nice day
Ago
In an old thread I had read that changing config-default.php in not the best idea because the file is replaced every time you update the Lime release.
What do you think about that? This mean that the config-default.php must be edited everytime a release change is uploaded?
Thanks in advance for your gentle reply.
Have a nice day
Ago
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
2 years 6 months ago #220031
by holch
When you are already at it, and assuming that you are not the "regular update" type of person, seeing that you are still running a 2.05, I would recommend to go straight to LS 5.x, because from what I know, LS 3 will only be supported until the end of this year. After that, it will only receive security updates (and not sure for how long).
Updating to LS 3.x might not be worth the while for the last 3,5 months until LS 3.x is end of life.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Manage more file extension in 2.05 rel
while I'm planning a version upgrade to 3.27.
When you are already at it, and assuming that you are not the "regular update" type of person, seeing that you are still running a 2.05, I would recommend to go straight to LS 5.x, because from what I know, LS 3 will only be supported until the end of this year. After that, it will only receive security updates (and not sure for how long).
Updating to LS 3.x might not be worth the while for the last 3,5 months until LS 3.x is end of life.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
2 years 6 months ago - 2 years 6 months ago #220032
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Manage more file extension in 2.05 rel
You should always change the config.php, not the config-defaults.php from what I know.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Last edit: 2 years 6 months ago by holch.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
2 years 6 months ago #220051
by DenisChenu
manual.limesurvey.org/Optional_settings#Introduction
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Manage more file extension in 2.05 rel
+1 , NEVER update config-default.phpYou should always change the config.php, not the config-defaults.php from what I know.
manual.limesurvey.org/Optional_settings#Introduction
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- achecchini
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
2 years 6 months ago #220092
by achecchini
Replied by achecchini on topic Manage more file extension in 2.05 rel
Hi to all Lime users that was so gentle to reply to my questions!
1) reply to Holch: Yes I agree the best idea is to became a "regular update" type of person & Yes is necessary to upgrade from 2.05 up to last stable release!
2) reply to Holch & Denis: I understand: config-default.php should never been modify!
Ok. But considering the problem of changing the file extention and MIME type to others format what I shoud to do in the 2.05 release?
In the file I have extracted from my actual Lime configuration the only linees i see in config.php to be modify for this goal are:
'types' => array(
// CKEditor & FCKEditor types
'files' => "",
'flash' => "swf",
'images' => "*img",
// TinyMCE types
'file' => "",
'media' => "swf flv avi mpg mpeg qt mov wmv asf rm",
'image' => "*img",
),
I haven't found any lines with the command:
$config(allowed* ...
that the manual indicates as the line must be changed!
So I'm confused about where I must change the instructions!
Above all I find strange that these lines are empty despite to the fact that actually extention file like: .doc, .xls, .pdf are regulary managed!
1) reply to Holch: Yes I agree the best idea is to became a "regular update" type of person & Yes is necessary to upgrade from 2.05 up to last stable release!
2) reply to Holch & Denis: I understand: config-default.php should never been modify!
Ok. But considering the problem of changing the file extention and MIME type to others format what I shoud to do in the 2.05 release?
In the file I have extracted from my actual Lime configuration the only linees i see in config.php to be modify for this goal are:
'types' => array(
// CKEditor & FCKEditor types
'files' => "",
'flash' => "swf",
'images' => "*img",
// TinyMCE types
'file' => "",
'media' => "swf flv avi mpg mpeg qt mov wmv asf rm",
'image' => "*img",
),
I haven't found any lines with the command:
$config(allowed* ...
that the manual indicates as the line must be changed!
So I'm confused about where I must change the instructions!
Above all I find strange that these lines are empty despite to the fact that actually extention file like: .doc, .xls, .pdf are regulary managed!
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12888
- Thank you received: 3965
2 years 6 months ago #220105
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Manage more file extension in 2.05 rel
And just to clarify:
I did not recommend to change the "config-default.php"
I only showed which extensions are existing there.
And in "config.php" you see this line
// Use the following config variable to set modified optional settings copied from config-defaults.php
That was my idea.
Joffm
I did not recommend to change the "config-default.php"
I only showed which extensions are existing there.
And in "config.php" you see this line
// Use the following config variable to set modified optional settings copied from config-defaults.php
That was my idea.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu, holch, achecchini
The topic has been locked.
- achecchini
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
2 years 6 months ago #220139
by achecchini
Replied by achecchini on topic Manage more file extension in 2.05 rel
Thanks Joffm for patience and replay!
So, as suggested, in the config.php, under the statment
// Use the following config variable ...
I put:
'config'=>array(
$config = 'gif,ico,jpg,png'; // Image file types allowed to be uploaded in the themes section.
$config = 'css,js,map,json,eot,ttf,woff,txt,md,xml,woff2,twig'; // Other file types allowed to be uploaded in the themes section.
$config = '7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,ico,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,xml,zip,css,js'; // File types allowed to be uploaded in the resources sections, and with the HTML Editor
)
to manage file extention as desiderated. Right?
Ago
So, as suggested, in the config.php, under the statment
// Use the following config variable ...
I put:
'config'=>array(
$config = 'gif,ico,jpg,png'; // Image file types allowed to be uploaded in the themes section.
$config = 'css,js,map,json,eot,ttf,woff,txt,md,xml,woff2,twig'; // Other file types allowed to be uploaded in the themes section.
$config = '7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,ico,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,xml,zip,css,js'; // File types allowed to be uploaded in the resources sections, and with the HTML Editor
)
to manage file extention as desiderated. Right?
Ago
The topic has been locked.