- Posts: 8
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
integrating a file uploader (such as UPPY) into a question in LimeSurvey ?
- DPF-QualiQuan
- Topic Author
- Offline
- New Member
Less
More
4 months 3 weeks ago #252946
by DPF-QualiQuan
integrating a file uploader (such as UPPY) into a question in LimeSurvey ? was created by DPF-QualiQuan
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Community Edition Version 6.2.11+231007
Own server or LimeSurvey hosting: Own Server
Survey theme/template: Bootswatch ( bootswatch )
==================
Hello LimeSurvey Community,
The problem described hereunder leads me to suspect there might be content security policies (CSP) or other restrictions in LimeSurvey that could be blocking or restricting the loading of these external resources :
I've been working on integrating the Uppy file uploader (from Transloadit) into a question on LimeSurvey.
Initially, I faced issues with the Uppy scripts not being executed, which led to a "Uppy not defined" error in the browser console.
To tackle this, I've made adjustments to the placement of my scripts and ensured they run after the entire page is loaded.
This seemed to help, and I no longer see the "Uppy not defined" error.
However, I'm now facing a different challenge.
When trying to access Uppy's scripts and styles, I receive a 403 error in the console, indicating a forbidden request.
I've attached a screenshot for your reference.
Could you provide some guidance on whether LimeSurvey has any such policies or restrictions in place?
If so, is there a way I can whitelist or allow specific external resources like Uppy to ensure they load without issues?
I aim to provide a seamless experience for my survey participants, so any insights or advice on resolving this would be invaluable.
Thank you in advance for your assistance.
Best regards,
Your LimeSurvey version: LimeSurvey Community Edition Version 6.2.11+231007
Own server or LimeSurvey hosting: Own Server
Survey theme/template: Bootswatch ( bootswatch )
==================
Hello LimeSurvey Community,
The problem described hereunder leads me to suspect there might be content security policies (CSP) or other restrictions in LimeSurvey that could be blocking or restricting the loading of these external resources :
I've been working on integrating the Uppy file uploader (from Transloadit) into a question on LimeSurvey.
Initially, I faced issues with the Uppy scripts not being executed, which led to a "Uppy not defined" error in the browser console.
To tackle this, I've made adjustments to the placement of my scripts and ensured they run after the entire page is loaded.
This seemed to help, and I no longer see the "Uppy not defined" error.
However, I'm now facing a different challenge.
When trying to access Uppy's scripts and styles, I receive a 403 error in the console, indicating a forbidden request.
I've attached a screenshot for your reference.
Could you provide some guidance on whether LimeSurvey has any such policies or restrictions in place?
If so, is there a way I can whitelist or allow specific external resources like Uppy to ensure they load without issues?
I aim to provide a seamless experience for my survey participants, so any insights or advice on resolving this would be invaluable.
Thank you in advance for your assistance.
Best regards,
Attachments:
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
4 months 3 weeks ago #252950
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic integrating a file uploader (such as UPPY) into a question in LimeSurvey ?
I guess the first question is why not use the core file upload question type?
Regarding the plugin files:
- Where are they stored on your server?
- What are the directory permissions?
- How and where include them?
Regarding the plugin files:
- Where are they stored on your server?
- What are the directory permissions?
- How and where include them?
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.
- DPF-QualiQuan
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
4 months 2 weeks ago #253150
by DPF-QualiQuan
Replied by DPF-QualiQuan on topic integrating a file uploader (such as UPPY) into a question in LimeSurvey ?
Hi!
thanks for considering my request.
I'm working on a unique approach to capture user voice recordings in my survey and then upload them to Google Cloud Storage through the Uppy uploader with Transloadit. Here's a brief overview of my methodology:
Survey Structure: I'm using LimeSurvey Community Edition Version 6.2.11+231007 hosted on my OVH server.
My questions have both an HTML and a script tab where I can embed HTML and JavaScript respectively.
Voice Recording: I utilize the MediaRecorder API for voice recording, triggered by the user. This process involves real-time visualization and controls like 'record', 'pause', and 'stop'.
File Naming: After recording, the audio file is automatically named based on various identifiers like date, time, and specific survey-related variables like ids_survey.NAOK, ids_gid.NAOK, and others.
User Control: Post-recording, users can listen to their recording, rename it, or even choose to re-record.
File Uploading: Rather than immediately uploading the file post-recording, I've introduced an "Validate my recording" button. Only upon clicking this will the file be uploaded. This ensures users have full control and satisfaction with their recording before it's uploaded.
The audio file present in the DOM is intended for this upload.
Uppy Integration: I'm attempting to integrate Uppy to facilitate the upload to Google Cloud Storage via Transloadit after the user validates their recording.
However, I'm encountering issues with the Uppy integration and the external scripts not being loaded, resulting in a "Uppy not defined" error in the console.
I've detailed the process above to highlight that this isn't a standard “file upload” but a more involved process tailored to the user experience. Given this unique approach, could you provide guidance on integrating Uppy and ensuring the external scripts are loaded correctly?
Thank you for your assistance!
Best regards,
thanks for considering my request.
I'm working on a unique approach to capture user voice recordings in my survey and then upload them to Google Cloud Storage through the Uppy uploader with Transloadit. Here's a brief overview of my methodology:
Survey Structure: I'm using LimeSurvey Community Edition Version 6.2.11+231007 hosted on my OVH server.
My questions have both an HTML and a script tab where I can embed HTML and JavaScript respectively.
Voice Recording: I utilize the MediaRecorder API for voice recording, triggered by the user. This process involves real-time visualization and controls like 'record', 'pause', and 'stop'.
File Naming: After recording, the audio file is automatically named based on various identifiers like date, time, and specific survey-related variables like ids_survey.NAOK, ids_gid.NAOK, and others.
User Control: Post-recording, users can listen to their recording, rename it, or even choose to re-record.
File Uploading: Rather than immediately uploading the file post-recording, I've introduced an "Validate my recording" button. Only upon clicking this will the file be uploaded. This ensures users have full control and satisfaction with their recording before it's uploaded.
The audio file present in the DOM is intended for this upload.
Uppy Integration: I'm attempting to integrate Uppy to facilitate the upload to Google Cloud Storage via Transloadit after the user validates their recording.
However, I'm encountering issues with the Uppy integration and the external scripts not being loaded, resulting in a "Uppy not defined" error in the console.
I've detailed the process above to highlight that this isn't a standard “file upload” but a more involved process tailored to the user experience. Given this unique approach, could you provide guidance on integrating Uppy and ensuring the external scripts are loaded correctly?
Thank you for your assistance!
Best regards,
Please Log in to join the conversation.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
4 months 2 weeks ago #253158
by DenisChenu
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 integrating a file uploader (such as UPPY) into a question in LimeSurvey ?
> Voice Recording: I utilize the MediaRecorder API for voice recording, triggered by the user. This process involves real-time visualization and controls like 'record', 'pause', and 'stop'.
There are a theme to do this, check at survey-consulting.com/ maybe or tpartner ( github.com/tpartner ) who work on the theme).
There are a theme to do this, check at survey-consulting.com/ maybe or tpartner ( github.com/tpartner ) who work on the theme).
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.
Please Log in to join the conversation.
- DPF-QualiQuan
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
4 months 2 weeks ago - 4 months 2 weeks ago #253160
by DPF-QualiQuan
Replied by DPF-QualiQuan on topic integrating a file uploader (such as UPPY) into a question in LimeSurvey ?
Denis,
Thanks for responding so fast.
following the links you provided, I couldn't find the theme you mentioned: would you kindly give me more details regarding this theme and/or the screenshot attached to your reply ?
[Link removed]
Thanks for responding so fast.
following the links you provided, I couldn't find the theme you mentioned: would you kindly give me more details regarding this theme and/or the screenshot attached to your reply ?
[Link removed]
Last edit: 4 months 2 weeks ago by tpartner. Reason: Link removed
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
4 months 2 weeks ago #253162
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic integrating a file uploader (such as UPPY) into a question in LimeSurvey ?
Please do not insert links unless they are relevant to your problem.
Have you tried including the Uppy files from a CDN?
- www.jsdelivr.com/package/npm/uppy
Have you tried including the Uppy files from a CDN?
- www.jsdelivr.com/package/npm/uppy
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
Please Log in to join the conversation.
- DPF-QualiQuan
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
4 months 2 weeks ago - 4 months 2 weeks ago #253163
by DPF-QualiQuan
Replied by DPF-QualiQuan on topic integrating a file uploader (such as UPPY) into a question in LimeSurvey ?
Hello,
Thank you for your suggestion.
I've checked my code and confirmed that I am indeed using a CDN to load Uppy and its Transloadit plugin. In my HTML tab, I have included "
"and "
tags pointing to Uppy's CSS and JS files hosted on jsDelivr (version 2.3.0 for Uppy and version 4.0.0 for the Transloadit plugin).
Despite this, I'm encountering the "Uppy not defined" error.
My JavaScript script handles audio recording and visualization, and it's meant to integrate with Uppy for file uploads.
I've ensured the scripts are loaded in the correct order, but the issue persists.
Could there be a scope issue, or a potential conflict with other scripts?
I'm seeking guidance on how to resolve this and ensure smooth integration of Uppy in my LimeSurvey setup.
Thank you for any further assistance!
Thank you for your suggestion.
I've checked my code and confirmed that I am indeed using a CDN to load Uppy and its Transloadit plugin. In my HTML tab, I have included "
Code:
<link>
Code:
<script>"
Despite this, I'm encountering the "Uppy not defined" error.
My JavaScript script handles audio recording and visualization, and it's meant to integrate with Uppy for file uploads.
I've ensured the scripts are loaded in the correct order, but the issue persists.
Could there be a scope issue, or a potential conflict with other scripts?
I'm seeking guidance on how to resolve this and ensure smooth integration of Uppy in my LimeSurvey setup.
Thank you for any further assistance!
Last edit: 4 months 2 weeks ago by DPF-QualiQuan.
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
4 months 2 weeks ago #253164
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic integrating a file uploader (such as UPPY) into a question in LimeSurvey ?
Well, without knowing what your coding is we have no way to offer suggestions.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
Please Log in to join the conversation.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
4 months 2 weeks ago #253166
by DenisChenu
Send an email.
You are interested ?
Test link : demo.sondages.pro/219626?token=TEST&newtest=Y
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 integrating a file uploader (such as UPPY) into a question in LimeSurvey ?
Yes, because it's still in beta version if i don't make error.following the links you provided, I couldn't find the theme you mentioned: would you kindly give me more details regarding this theme and/or the screenshot attached to your reply ?
Send an email.
You are interested ?
Test link : demo.sondages.pro/219626?token=TEST&newtest=Y
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.
Please Log in to join the conversation.
- DPF-QualiQuan
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
4 months 2 weeks ago - 4 months 2 weeks ago #253167
by DPF-QualiQuan
Replied by DPF-QualiQuan on topic integrating a file uploader (such as UPPY) into a question in LimeSurvey ?
Dear Tony & Denis,
I really appreciate your help, and hope you'll find in my code any solution.
Attached html and javascript parts.
Of course, if there's a simplest way such as using existing functions ("uploadquestion.js" and/or "uploader.js") in order to upload audio files and attached them with the survey, that would be more elegant .....
Best regards,
Eric
I really appreciate your help, and hope you'll find in my code any solution.
Attached html and javascript parts.
Of course, if there's a simplest way such as using existing functions ("uploadquestion.js" and/or "uploader.js") in order to upload audio files and attached them with the survey, that would be more elegant .....
Best regards,
Eric
Attachments:
Last edit: 4 months 2 weeks ago by DPF-QualiQuan.
Please Log in to join the conversation.
- DPF-QualiQuan
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
4 months 2 weeks ago #253244
by DPF-QualiQuan
Replied by DPF-QualiQuan on topic integrating a file uploader (such as UPPY) into a question in LimeSurvey ?
Hi Tony and Denis,
As far now you've got all the code, have you any suggestion that could help us?
Thank you in advance for your support,
Eric
As far now you've got all the code, have you any suggestion that could help us?
Thank you in advance for your support,
Eric
Please Log in to join the conversation.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
4 months 2 weeks ago - 4 months 2 weeks ago #253250
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic integrating a file uploader (such as UPPY) into a question in LimeSurvey ?
Sorry, I don't have time to try and create a survey and try to replicate your recording elements. I was thinking more along the lines of a sample survey, including all code and elements.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 months 2 weeks ago by tpartner.
Please Log in to join the conversation.