Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How to upload image file on Chrome brwoser

  • leemgs
  • leemgs's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 months 1 week ago - 6 months 3 days ago #251286 by leemgs
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?

2. How to reproduce the issue (Temporal links):
1. Limesurvey demo, admin mode - demo.limesurvey.org/index.php?r=surveyAd...iew&iSurveyID=768633
2. 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  


3. 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)

 

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. 

 
Last edit: 6 months 3 days ago by leemgs.

Please Log in to join the conversation.

  • leemgs
  • leemgs's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 months 3 days ago #251444 by leemgs
Replied by leemgs on topic How to upload image file on Chrome brwoser
I found the related reports as follows.

* 16194: file upload disables other clicks (2020-08-24)
bugs.limesurvey.org/view.php?id=16194

* 16415: can't upload files with Google Chrome (2020-06-26)
bugs.limesurvey.org/view.php?id=16415

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 months 2 days ago #251463 by holch
Replied by holch on topic How to upload image file on Chrome brwoser
Both the bugs you mention have been closed.

What version of Limesurvey is this happening with?

If this is happening in a recent version (up to date) of Limesurvey, please file a bug report at bugs.limesurvey.org

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • leemgs
  • leemgs's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 months 2 days ago - 6 months 1 day ago #251497 by leemgs
Replied by leemgs on topic How to upload image file on Chrome brwoser
To Holch,

Thank you. I posted this issue on the below website.
* bugs.limesurvey.org/view.php?id=19193
(19192: How To Upload Image File On Chrome Browser)

BRs,
Geunsik Lim.
Last edit: 6 months 1 day ago by leemgs.
The following user(s) said Thank You: tpartner

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 months 1 day ago #251512 by tpartner
Replied by tpartner on topic How to upload image file on Chrome brwoser
I don't have any problems uploading an image to the demo site (v 6.3.0) using Chrome 118.0.5993.117.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • leemgs
  • leemgs's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 months 1 day ago - 6 months 1 day ago #251517 by leemgs
Replied by leemgs on topic How to upload image file on Chrome brwoser
To tpartner,

In order to reproduce my issue, please refer to the  bugs.limesurvey.org/view.php?id=19193


BRs,
Geunsik Lim. 
Last edit: 6 months 1 day ago by leemgs.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 months 1 day ago #251520 by holch
Replied by holch on topic How to upload image file on Chrome brwoser
I just tried the link you provided and everything went smooth with upload and everything, only when submitting I am getting the error "Error moving file to target destination" but this has nothing to do with the described behavior from your side, right? My test was with Chrome 118.0.5993.89.

I also tried with Edge 118.0.2088.61 right now and it works just the same as with Chrome. With the same error at the end.

Did you try with Chrome with all addons deactivated? Or did you try with Chrome on a different browser?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 months 1 day ago #251521 by holch
Replied by holch on topic How to upload image file on Chrome brwoser
I also tried by copying something Korean (to exclude the chance that the issue is with Korean letters) and it works just the same, with the same error on submitting. But this seems to be a totally different issue.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose