View Issue Details

This bug affects 1 person(s).
 14
IDProjectCategoryView StatusLast Update
19192Bug reportsPluginspublic2023-10-25 12:10
Reporterleemgs Assigned Totibor.pacalat  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version6.2.x 
Summary19192: How To Upload Image File On Chrome Brwoser
Description

I tried to upload a file in Chrome browser and it failed. The file is not uploaded and only JSON information is displayed in the browser as shown below.

  1. Log message
    { "success":true,"size":267.296875,"name":"sad-engineer.jpg","ext":"jpg","filename":"futmp_haxrm97kawpk9b5_jpg","msg":"The file has been successfully uploaded." }

On the other hand, when I use the Edge browser and Firefox, the file upload works fine.

What can I do to resolve this issue?

  1. How to reproduce the issue (Temporal links):

  2. Limesurvey demo, admin mode - demo.limesurvey.org/index.php?r=surveyAd...iew&iSurveyID=768633

  3. Limesurvey demo, user mode -
    demo.limesurvey.org/index.php?r=survey/i...8633/gid/78/qid/2446
    demo.limesurvey.org/index.php?r=survey/index&sid=768633&lang=en

  4. Debug messages:
    I analyzed the cause of files not being uploaded properly when trying to upload files in the Chrome browser.
    Below are the debugging and log messages I collected.
    In summary, when performing the file upload function in the Chrome browser, the JavaScript function called currentUploadHandler is not performing properly.

3.1. Chrom browser, debug message, VM349
VM349:1 Uncaught TypeError: Cannot read properties of null (reading 'removeChild')
at removeNode (<anonymous>:1:1874)
at HTMLIFrameElement.<anonymous> (<anonymous>:1:6347)

limesurvey-file-upload-err.JPG

3.2. JavaScript error occurs::
window.currentUploadHandler=new uploadHandler(e,t),window.currentUploadHandler.init(),window.currentUploadHandler}}))

!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict"function(){function addEvent(e,t,a){if(e.addEventListener)e.addEventListener(t,a,!1);else{if(!e.attachEvent)throw new Error("not supported or DOM not loaded");e.attachEvent("on"+t,(function(){a.call(e)}))}}if(document.documentElement.getBoundingClientRect)var getOffset=function(e)............................0!=s&&n<s&&showpopups?!!confirm(uploadLang.errorNeedMoreConfirm.replace("%s",s-n))&&l(e,t,a,i),!0)l(e,t,a,i),!0)}}};function escapeHtml(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}window.getUploadHandler=function(e,t){return window.currentUploadHandler=new uploadHandler(e,t),window.currentUploadHandler.init(),window.currentUploadHandler}}));
//# sourceMappingURL=uploadquestion.min.js.map

3.3. Storage device file folder part, corresponding temporary file area:
invain@ubuntu:/var/www/html/survey$
invain@ubuntu:/var/www/html/survey$ grep -R "sourceMappingURL=uploadquestion.min.js.map" ./ | more
./assets/packages/questions/upload/build/uploadquestion.min.js://# sourceMappingURL=uploadquestion.min.js.map
./tmp/assets/c23a8689/build/uploadquestion.min.js://# sourceMappingURL=uploadquestion.min.js.map
./tmp/assets/bb996b00/build/uploadquestion.min.js://# sourceMappingURL=uploadquestion.min.js.map
./tmp/assets/da14ce5a/build/uploadquestion.min.js://# sourceMappingURL=uploadquestion.min.js.map
invain@ubuntu:/var/www/html/survey$
invain@ubuntu:/var/www/html/survey$

BRs,
Geunsik Lim.

Steps To Reproduce

Steps to reproduce

  1. Open chrome browser
  2. Create the file upload function in a survey
  3. Try to upload a file (e.g., .jpg)

Expected result

We can see the uploaded file information from the pop-up window.

Actual result

We got the the below json messages on chrome browser unexpectedly.
{ "success":true,"size":267.296875,"name":"sad-engineer.jpg","ext":"jpg","filename":"futmp_haxrm97kawpk9b5_jpg","msg":"The file has been successfully uploaded." }

TagsNo tags attached.
Attached Files
limesurvey-file-upload-err.JPG (73,725 bytes)   
limesurvey-file-upload-err.JPG (73,725 bytes)   
Bug heat14
Complete LimeSurvey version number (& build)LimeSurvey Community Edition Version 6.2.6+230904
I will donate to the project if issue is resolvedYes
BrowserChrome Browser (Version 118.0.5993.71 64bit)
Database type & versionMySQL 8.0.34-0ubuntu0.22.04.1 for Linux on x86_64
Server OS (if known)Ubuntu 22.04 LTS (64bit)
Webserver software & version (if known)Apache 2.4.52-1ubuntu4.4
PHP VersionPHP 8.1.2-1ubuntu2.14

Relationships

has duplicate 19193 closedtibor.pacalat How To Upload Image File On Chrome Brwoser 

Users monitoring this issue

leemgs

Activities

tibor.pacalat

tibor.pacalat

2023-10-25 12:10

administrator   ~77970

Closing because this is a duplicate to https://bugs.limesurvey.org/view.php?id=19193.

Issue History

Date Modified Username Field Change
2023-10-25 09:26 leemgs New Issue
2023-10-25 09:26 leemgs File Added: limesurvey-file-upload-err.JPG
2023-10-25 09:27 leemgs Issue Monitored: leemgs
2023-10-25 09:27 leemgs Bug heat 0 => 2
2023-10-25 09:28 leemgs Issue cloned: 19193
2023-10-25 10:22 DenisChenu Relationship added has duplicate 19193
2023-10-25 10:22 DenisChenu Bug heat 2 => 8
2023-10-25 12:07 tibor.pacalat Bug heat 8 => 10
2023-10-25 12:10 tibor.pacalat Assigned To => tibor.pacalat
2023-10-25 12:10 tibor.pacalat Status new => closed
2023-10-25 12:10 tibor.pacalat Resolution open => fixed
2023-10-25 12:10 tibor.pacalat Note Added: 77970
2023-10-25 15:55 leemgs Bug heat 10 => 12
2023-10-25 17:55 holch Bug heat 12 => 14