Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload folder is not right, uploading/using uploaded files are not working #86

Open
asandikci opened this issue Sep 16, 2023 · 3 comments

Comments

@asandikci
Copy link

Describe the bug

limesurvey defaults to /var/www/$app as / if I'm not wrong. But data files are located in /home/yunohost.app/$app/upload and this path linked to /var/www/$app/upload (linked as /var/www/$app/upload/upload). So:

  • Files uploading in /home/yunohost.app/$app/upload/... (symbolic linked as /var/www/$app/upload/upload/...)
  • When choosing image from editor (for creating survey questions), KCFinder finds /home/yunohost.app/$app/upload/surveys/{ID}/images/image.png succesfully.
  • After we choose image, limesurvey automatically places path /upload/surveys/{ID}/images/image.png to URL
  • BUT image preview/adding not working. Probably because of limesurvey root path / defaults to /var/www/$app but /var/www/$app/upload/surveys/{ID}/images/image.png is not right path
  • right path is: /var/www/$app/upload/upload/surveys/{ID}/images/image.png

Workaround

  • While using your files (tested on images), you choose a image from server and an image URL automatically pasted (/upload/surveys/{ID}/images/image.png). Add /upload as prefix to this path. (briefly use upload twice) /upload/upload/surveys.....

Context

  • Hardware: VPS bought online
  • YunoHost version: 11.2.4 (stable)
  • I have access to my server: Through SSH | through the webadmin
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
  • Using, or trying to install package version/branch: 5.6.8+230227~ynh1

Steps to reproduce

please see Describe the bug section above. But first create a survey, question group and question

Expected behavior

One click file uploading, one click file using

Related PRs

#85 - currently solved uploading problem but other problems(explained in this issue) are still persist

@asandikci
Copy link
Author

asandikci commented Sep 16, 2023

Possible Solutions

  1. move all /var/www/$app/upload content to /home/yunohost.app/$app/upload, create symbolic link as /var/www/$app/upload/ for /home/yunohost.app/$app/upload (not as /var/www/$app/upload/upload) - is this safe ?
  2. Don't change anything and just configure URL placeholder when we choose a file in KCFinder, thanks to our configuration system adds /upload prefix automatically

Which solution is better? Or there any other solution?

@zamentur
Copy link
Contributor

zamentur commented Feb 9, 2024

I have used your first solution.
However, it means it could be possible to search for public image inside those urls... I don't know if limesurvey should serve those image by itself ?

@Shnoulle
Copy link
Contributor

Shnoulle commented Feb 10, 2024

I have used your first solution. However, it means it could be possible to search for public image inside those urls... I don't know if limesurvey should serve those image by itself ?

This is needed : direct link used for files like upload/surveys/XXX/files/myfile.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants