View Issue Details

This bug affects 1 person(s).
 0
IDProjectCategoryView StatusLast Update
19073Bug reportsFile managerpublic2023-09-07 16:36
Reporterpablo81 Assigned To 
PrioritynoneSeverityminor 
Status newResolutionopen 
Product Version5.6.x 
Summary19073: File extensions removed when uploading files
Description

When I upload a file using a "File upload (Type: |)" question type, they are renamed (what is basically OK) and the extension is removed. Those files are correctly saved, and I can access them and individually download with the original name and extension from the responses tab. However, when I am trying to migrate my survey together with the resources to another instance of LimeSurvey, export of the resources as a .zip from the resources tab works correctly, but I get an error while importing the files, because no extension is not allowed for import.

Steps To Reproduce
  1. Execute a survey and upload a file (e.g. .jpg or .png).
  2. Select a survey in a survey list
  3. Go to resources tab and select "Export resoures as ZIP achive"
  4. Copy the survey to other instance of LimeSurvey (as .lss or .lsa) (Alternatively you may skip the step 4 and try to reimport the files to the original survey.)
  5. Go to the resources tab of the copied survey and select "Import resources ZIP archive"
  6. You will see a message: Import survey resources - Error, and a list of files that have not been uploaded with the text "(Forbidden extension)"
    Alternatively you may skip the step 4 and try to reimport the files to the original survey.
TagsNo tags attached.
Attached Files
limesurvey_survey_931788(2).lss (18,092 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<document>
 <LimeSurveyDocType>Survey</LimeSurveyDocType>
 <DBVersion>498</DBVersion>
 <languages>
  <language>en</language>
 </languages>
 <groups>
  <fields>
   <fieldname>gid</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>group_order</fieldname>
   <fieldname>randomization_group</fieldname>
   <fieldname>grelevance</fieldname>
  </fields>
  <rows>
   <row>
    <gid><![CDATA[2350]]></gid>
    <sid><![CDATA[931788]]></sid>
    <group_order><![CDATA[0]]></group_order>
    <randomization_group/>
    <grelevance/>
   </row>
  </rows>
 </groups>
 <group_l10ns>
  <fields>
   <fieldname>id</fieldname>
   <fieldname>gid</fieldname>
   <fieldname>group_name</fieldname>
   <fieldname>description</fieldname>
   <fieldname>language</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>group_order</fieldname>
   <fieldname>randomization_group</fieldname>
   <fieldname>grelevance</fieldname>
  </fields>
  <rows>
   <row>
    <id><![CDATA[2148]]></id>
    <gid><![CDATA[2350]]></gid>
    <group_name><![CDATA[Firmware]]></group_name>
    <description/>
    <language><![CDATA[en]]></language>
    <sid><![CDATA[931788]]></sid>
    <group_order><![CDATA[0]]></group_order>
    <randomization_group/>
    <grelevance/>
   </row>
  </rows>
 </group_l10ns>
 <questions>
  <fields>
   <fieldname>qid</fieldname>
   <fieldname>parent_qid</fieldname>
   <fieldname>sid</fieldname>
   <fieldname>gid</fieldname>
   <fieldname>type</fieldname>
   <fieldname>title</fieldname>
   <fieldname>preg</fieldname>
   <fieldname>other</fieldname>
   <fieldname>mandatory</fieldname>
   <fieldname>question_order</fieldname>
   <fieldname>scale_id</fieldname>
   <fieldname>same_default</fieldname>
   <fieldname>relevance</fieldname>
   <fieldname>modulename</fieldname>
   <fieldname>encrypted</fieldname>
   <fieldname>question_theme_name</fieldname>
   <fieldname>same_script</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[26551]]></qid>
    <parent_qid><![CDATA[0]]></parent_qid>
    <sid><![CDATA[931788]]></sid>
    <gid><![CDATA[2350]]></gid>
    <type><![CDATA[|]]></type>
    <title><![CDATA[Screenshot]]></title>
    <other><![CDATA[N]]></other>
    <mandatory><![CDATA[Y]]></mandatory>
    <question_order><![CDATA[1]]></question_order>
    <scale_id><![CDATA[0]]></scale_id>
    <same_default><![CDATA[0]]></same_default>
    <relevance><![CDATA[1]]></relevance>
    <modulename/>
    <encrypted><![CDATA[N]]></encrypted>
    <question_theme_name><![CDATA[file_upload]]></question_theme_name>
    <same_script><![CDATA[0]]></same_script>
   </row>
  </rows>
 </questions>
 <question_l10ns>
  <fields>
   <fieldname>id</fieldname>
   <fieldname>qid</fieldname>
   <fieldname>question</fieldname>
   <fieldname>help</fieldname>
   <fieldname>language</fieldname>
   <fieldname>script</fieldname>
  </fields>
  <rows>
   <row>
    <id><![CDATA[24814]]></id>
    <qid><![CDATA[26551]]></qid>
    <question><![CDATA[<p>Please select a file with a screenshot</p>

<p> </p>
]]></question>
    <help/>
    <language><![CDATA[en]]></language>
   </row>
  </rows>
 </question_l10ns>
 <question_attributes>
  <fields>
   <fieldname>qid</fieldname>
   <fieldname>attribute</fieldname>
   <fieldname>value</fieldname>
   <fieldname>language</fieldname>
  </fields>
  <rows>
   <row>
    <qid><![CDATA[26551]]></qid>
    <attribute><![CDATA[allowed_filetypes]]></attribute>
    <value><![CDATA[png, gif, doc, odt, jpg, jpeg, pdf, png, heic]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[26551]]></qid>
    <attribute><![CDATA[cssclass]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[26551]]></qid>
    <attribute><![CDATA[hidden]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[26551]]></qid>
    <attribute><![CDATA[hide_tip]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[26551]]></qid>
    <attribute><![CDATA[max_filesize]]></attribute>
    <value><![CDATA[10240]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[26551]]></qid>
    <attribute><![CDATA[max_num_of_files]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[26551]]></qid>
    <attribute><![CDATA[min_num_of_files]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[26551]]></qid>
    <attribute><![CDATA[page_break]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[26551]]></qid>
    <attribute><![CDATA[random_group]]></attribute>
    <value/>
    <language/>
   </row>
   <row>
    <qid><![CDATA[26551]]></qid>
    <attribute><![CDATA[save_as_default]]></attribute>
    <value><![CDATA[N]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[26551]]></qid>
    <attribute><![CDATA[show_comment]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[26551]]></qid>
    <attribute><![CDATA[show_title]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[26551]]></qid>
    <attribute><![CDATA[statistics_graphtype]]></attribute>
    <value><![CDATA[0]]></value>
    <language/>
   </row>
   <row>
    <qid><![CDATA[26551]]></qid>
    <attribute><![CDATA[statistics_showgraph]]></attribute>
    <value><![CDATA[1]]></value>
    <language/>
   </row>
  </rows>
 </question_attributes>
 <surveys>
  <fields>
   <fieldname>sid</fieldname>
   <fieldname>admin</fieldname>
   <fieldname>expires</fieldname>
   <fieldname>startdate</fieldname>
   <fieldname>adminemail</fieldname>
   <fieldname>anonymized</fieldname>
   <fieldname>faxto</fieldname>
   <fieldname>format</fieldname>
   <fieldname>savetimings</fieldname>
   <fieldname>template</fieldname>
   <fieldname>language</fieldname>
   <fieldname>additional_languages</fieldname>
   <fieldname>datestamp</fieldname>
   <fieldname>usecookie</fieldname>
   <fieldname>allowregister</fieldname>
   <fieldname>allowsave</fieldname>
   <fieldname>autonumber_start</fieldname>
   <fieldname>autoredirect</fieldname>
   <fieldname>allowprev</fieldname>
   <fieldname>printanswers</fieldname>
   <fieldname>ipaddr</fieldname>
   <fieldname>refurl</fieldname>
   <fieldname>publicstatistics</fieldname>
   <fieldname>publicgraphs</fieldname>
   <fieldname>listpublic</fieldname>
   <fieldname>htmlemail</fieldname>
   <fieldname>sendconfirmation</fieldname>
   <fieldname>tokenanswerspersistence</fieldname>
   <fieldname>assessments</fieldname>
   <fieldname>usecaptcha</fieldname>
   <fieldname>usetokens</fieldname>
   <fieldname>bounce_email</fieldname>
   <fieldname>attributedescriptions</fieldname>
   <fieldname>emailresponseto</fieldname>
   <fieldname>emailnotificationto</fieldname>
   <fieldname>tokenlength</fieldname>
   <fieldname>showxquestions</fieldname>
   <fieldname>showgroupinfo</fieldname>
   <fieldname>shownoanswer</fieldname>
   <fieldname>showqnumcode</fieldname>
   <fieldname>bouncetime</fieldname>
   <fieldname>bounceprocessing</fieldname>
   <fieldname>bounceaccounttype</fieldname>
   <fieldname>bounceaccounthost</fieldname>
   <fieldname>bounceaccountpass</fieldname>
   <fieldname>bounceaccountencryption</fieldname>
   <fieldname>bounceaccountuser</fieldname>
   <fieldname>showwelcome</fieldname>
   <fieldname>showprogress</fieldname>
   <fieldname>navigationdelay</fieldname>
   <fieldname>nokeyboard</fieldname>
   <fieldname>alloweditaftercompletion</fieldname>
   <fieldname>googleanalyticsstyle</fieldname>
   <fieldname>googleanalyticsapikey</fieldname>
   <fieldname>questionindex</fieldname>
   <fieldname>gsid</fieldname>
   <fieldname>showsurveypolicynotice</fieldname>
   <fieldname>tokenencryptionoptions</fieldname>
   <fieldname>ipanonymize</fieldname>
  </fields>
  <rows>
   <row>
    <sid><![CDATA[931788]]></sid>
    <admin/>
    <adminemail/>
    <anonymized><![CDATA[N]]></anonymized>
    <format><![CDATA[G]]></format>
    <savetimings><![CDATA[N]]></savetimings>
    <template><![CDATA[fruity]]></template>
    <language><![CDATA[en]]></language>
    <additional_languages/>
    <datestamp><![CDATA[Y]]></datestamp>
    <usecookie><![CDATA[N]]></usecookie>
    <allowregister><![CDATA[N]]></allowregister>
    <allowsave><![CDATA[Y]]></allowsave>
    <autonumber_start><![CDATA[27]]></autonumber_start>
    <autoredirect><![CDATA[N]]></autoredirect>
    <allowprev><![CDATA[N]]></allowprev>
    <printanswers><![CDATA[N]]></printanswers>
    <ipaddr><![CDATA[N]]></ipaddr>
    <refurl><![CDATA[N]]></refurl>
    <publicstatistics><![CDATA[N]]></publicstatistics>
    <publicgraphs><![CDATA[N]]></publicgraphs>
    <listpublic><![CDATA[N]]></listpublic>
    <htmlemail><![CDATA[Y]]></htmlemail>
    <sendconfirmation><![CDATA[Y]]></sendconfirmation>
    <tokenanswerspersistence><![CDATA[N]]></tokenanswerspersistence>
    <assessments><![CDATA[N]]></assessments>
    <usecaptcha><![CDATA[N]]></usecaptcha>
    <usetokens><![CDATA[N]]></usetokens>
    <bounce_email/>
    <emailresponseto/>
    <emailnotificationto/>
    <tokenlength><![CDATA[15]]></tokenlength>
    <showxquestions><![CDATA[Y]]></showxquestions>
    <showgroupinfo><![CDATA[B]]></showgroupinfo>
    <shownoanswer><![CDATA[Y]]></shownoanswer>
    <showqnumcode><![CDATA[X]]></showqnumcode>
    <bounceprocessing><![CDATA[N]]></bounceprocessing>
    <showwelcome><![CDATA[Y]]></showwelcome>
    <showprogress><![CDATA[Y]]></showprogress>
    <navigationdelay><![CDATA[0]]></navigationdelay>
    <nokeyboard><![CDATA[N]]></nokeyboard>
    <alloweditaftercompletion><![CDATA[N]]></alloweditaftercompletion>
    <googleanalyticsstyle/>
    <googleanalyticsapikey/>
    <questionindex><![CDATA[0]]></questionindex>
    <gsid><![CDATA[1]]></gsid>
    <showsurveypolicynotice><![CDATA[0]]></showsurveypolicynotice>
    <tokenencryptionoptions><![CDATA[{ "enabled":"Y","columns":{ "firstname":"N","lastname":"N","email":"N" } }]]></tokenencryptionoptions>
    <ipanonymize><![CDATA[N]]></ipanonymize>
   </row>
  </rows>
 </surveys>
 <surveys_languagesettings>
  <fields>
   <fieldname>surveyls_survey_id</fieldname>
   <fieldname>surveyls_language</fieldname>
   <fieldname>surveyls_title</fieldname>
   <fieldname>surveyls_description</fieldname>
   <fieldname>surveyls_welcometext</fieldname>
   <fieldname>surveyls_endtext</fieldname>
   <fieldname>surveyls_url</fieldname>
   <fieldname>surveyls_urldescription</fieldname>
   <fieldname>surveyls_email_invite_subj</fieldname>
   <fieldname>surveyls_email_invite</fieldname>
   <fieldname>surveyls_email_remind_subj</fieldname>
   <fieldname>surveyls_email_remind</fieldname>
   <fieldname>surveyls_email_register_subj</fieldname>
   <fieldname>surveyls_email_register</fieldname>
   <fieldname>surveyls_email_confirm_subj</fieldname>
   <fieldname>surveyls_email_confirm</fieldname>
   <fieldname>surveyls_dateformat</fieldname>
   <fieldname>surveyls_attributecaptions</fieldname>
   <fieldname>email_admin_notification_subj</fieldname>
   <fieldname>email_admin_notification</fieldname>
   <fieldname>email_admin_responses_subj</fieldname>
   <fieldname>email_admin_responses</fieldname>
   <fieldname>surveyls_numberformat</fieldname>
   <fieldname>attachments</fieldname>
   <fieldname>surveyls_policy_notice</fieldname>
   <fieldname>surveyls_policy_error</fieldname>
   <fieldname>surveyls_policy_notice_label</fieldname>
   <fieldname>surveyls_alias</fieldname>
  </fields>
  <rows>
   <row>
    <surveyls_survey_id><![CDATA[931788]]></surveyls_survey_id>
    <surveyls_language><![CDATA[en]]></surveyls_language>
    <surveyls_title><![CDATA[File_Upload_Test]]></surveyls_title>
    <surveyls_description/>
    <surveyls_welcometext/>
    <surveyls_endtext/>
    <surveyls_url/>
    <surveyls_urldescription/>
    <surveyls_email_invite_subj><![CDATA[Invitation to participate in a survey]]></surveyls_email_invite_subj>
    <surveyls_email_invite><![CDATA[Dear {FIRSTNAME},<br />
<br />
You have been invited to participate in a survey.<br />
<br />
The survey is titled:<br />
"{SURVEYNAME}"<br />
<br />
"{SURVEYDESCRIPTION}"<br />
<br />
To participate, please click on the link below.<br />
<br />
Sincerely,<br />
<br />
{ADMINNAME} ({ADMINEMAIL})<br />
<br />
----------------------------------------------<br />
Click here to do the survey:<br />
{SURVEYURL}<br />
<br />
If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:<br />
{OPTOUTURL}<br />
<br />
If you are blacklisted but want to participate in this survey and want to receive invitations please click the following link:<br />
{OPTINURL}]]></surveyls_email_invite>
    <surveyls_email_remind_subj><![CDATA[Reminder to participate in a survey]]></surveyls_email_remind_subj>
    <surveyls_email_remind><![CDATA[Dear {FIRSTNAME},<br />
<br />
Recently we invited you to participate in a survey.<br />
<br />
We note that you have not yet completed the survey, and wish to remind you that the survey is still available should you wish to take part.<br />
<br />
The survey is titled:<br />
"{SURVEYNAME}"<br />
<br />
"{SURVEYDESCRIPTION}"<br />
<br />
To participate, please click on the link below.<br />
<br />
Sincerely,<br />
<br />
{ADMINNAME} ({ADMINEMAIL})<br />
<br />
----------------------------------------------<br />
Click here to do the survey:<br />
{SURVEYURL}<br />
<br />
If you do not want to participate in this survey and don't want to receive any more invitations please click the following link:<br />
{OPTOUTURL}]]></surveyls_email_remind>
    <surveyls_email_register_subj><![CDATA[Survey registration confirmation]]></surveyls_email_register_subj>
    <surveyls_email_register><![CDATA[Dear {FIRSTNAME},<br />
<br />
You, or someone using your email address, have registered to participate in an online survey titled {SURVEYNAME}.<br />
<br />
To complete this survey, click on the following URL:<br />
<br />
{SURVEYURL}<br />
<br />
If you have any questions about this survey, or if you did not register to participate and believe this email is in error, please contact {ADMINNAME} at {ADMINEMAIL}.]]></surveyls_email_register>
    <surveyls_email_confirm_subj><![CDATA[Confirmation of your participation in our survey]]></surveyls_email_confirm_subj>
    <surveyls_email_confirm><![CDATA[Dear {FIRSTNAME},<br />
<br />
This email is to confirm that you have completed the survey titled {SURVEYNAME} and your response has been saved. Thank you for participating.<br />
<br />
If you have any further questions about this email, please contact {ADMINNAME} on {ADMINEMAIL}.<br />
<br />
Sincerely,<br />
<br />
{ADMINNAME}]]></surveyls_email_confirm>
    <surveyls_dateformat><![CDATA[9]]></surveyls_dateformat>
    <email_admin_notification_subj><![CDATA[Response submission for survey {SURVEYNAME}]]></email_admin_notification_subj>
    <email_admin_notification><![CDATA[Hello,<br />
<br />
A new response was submitted for your survey '{SURVEYNAME}'.<br />
<br />
Click the following link to see the individual response:<br />
{VIEWRESPONSEURL}<br />
<br />
Click the following link to edit the individual response:<br />
{EDITRESPONSEURL}<br />
<br />
View statistics by clicking here:<br />
{STATISTICSURL}]]></email_admin_notification>
    <email_admin_responses_subj><![CDATA[Response submission for survey {SURVEYNAME} with results]]></email_admin_responses_subj>
    <email_admin_responses><![CDATA[Hello,<br />
<br />
A new response was submitted for your survey '{SURVEYNAME}'.<br />
<br />
Click the following link to see the individual response:<br />
{VIEWRESPONSEURL}<br />
<br />
Click the following link to edit the individual response:<br />
{EDITRESPONSEURL}<br />
<br />
View statistics by clicking here:<br />
{STATISTICSURL}<br />
<br />
<br />
The following answers were given by the participant:<br />
{ANSWERTABLE}]]></email_admin_responses>
    <surveyls_numberformat><![CDATA[0]]></surveyls_numberformat>
    <surveyls_alias/>
   </row>
  </rows>
 </surveys_languagesettings>
 <themes>
  <theme>
   <sid>931788</sid>
   <template_name>fruity</template_name>
   <config>
    <options>inherit</options>
   </config>
  </theme>
 </themes>
 <themes_inherited>
  <theme>
   <sid>931788</sid>
   <template_name>fruity</template_name>
   <config>
    <options>
     <ajaxmode>off</ajaxmode>
     <brandlogo>on</brandlogo>
     <brandlogofile>image::theme::files/logo.png</brandlogofile>
     <container>on</container>
     <backgroundimage>off</backgroundimage>
     <backgroundimagefile>./files/pattern.png</backgroundimagefile>
     <animatebody>off</animatebody>
     <bodyanimation>fadeInRight</bodyanimation>
     <bodyanimationduration>1.0</bodyanimationduration>
     <animatequestion>off</animatequestion>
     <questionanimation>flipInX</questionanimation>
     <questionanimationduration>1.0</questionanimationduration>
     <animatealert>off</animatealert>
     <alertanimation>shake</alertanimation>
     <alertanimationduration>1.0</alertanimationduration>
     <font>noto</font>
     <bodybackgroundcolor>#ffffff</bodybackgroundcolor>
     <fontcolor>#444444</fontcolor>
     <questionbackgroundcolor>#ffffff</questionbackgroundcolor>
     <questionborder>on</questionborder>
     <questioncontainershadow>on</questioncontainershadow>
     <checkicon>f00c</checkicon>
     <animatecheckbox>on</animatecheckbox>
     <checkboxanimation>rubberBand</checkboxanimation>
     <checkboxanimationduration>0.5</checkboxanimationduration>
     <animateradio>on</animateradio>
     <radioanimation>zoomIn</radioanimation>
     <radioanimationduration>0.3</radioanimationduration>
     <showpopups>1</showpopups>
     <zebrastriping>off</zebrastriping>
     <stickymatrixheaders>off</stickymatrixheaders>
     <greyoutselected>off</greyoutselected>
     <hideprivacyinfo>off</hideprivacyinfo>
     <crosshover>off</crosshover>
     <fixnumauto>off</fixnumauto>
    </options>
   </config>
  </theme>
 </themes_inherited>
</document>
limesurvey_survey_931788(2).lss (18,092 bytes)   
Bug heat0
Complete LimeSurvey version number (& build)5.6.25
I will donate to the project if issue is resolvedNo
BrowserEdge
Database type & versionphpMyAdmin
Server OS (if known)
Webserver software & version (if known)
PHP Version7.3.20

Users monitoring this issue

There are no users monitoring this issue.

Activities

Issue History

Date Modified Username Field Change
2023-09-07 16:36 pablo81 New Issue
2023-09-07 16:36 pablo81 File Added: limesurvey_survey_931788(2).lss