Are we able to view uploaded files within the notification email?

More
2 years 4 months ago #122995 by DOwen
DOwen replied the topic: Are we able to view uploaded files within the notification email?
Hi Denis,

Thanks for your reply. Sounds good although I'm not quite sure what you mean and how this works?

Please Log in to join the conversation.

More
2 years 4 months ago #122998 by tpartner
tpartner replied the topic: Are we able to view uploaded files within the notification email?
I think what Denis means is that he creates the "report" content for the email in a hidden (by CSS or JS) text-display question and then simply pipes that question into the email template. This may give some more flexibility with Expression Manager when creating the "report".

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.

More
2 years 4 months ago #122999 by DOwen
DOwen replied the topic: Are we able to view uploaded files within the notification email?
Thanks for replying! I think I'd probably need a walkthrough with this one if I was to pursue this as it's confused me a little.

I'm finding it difficult trying to imagine how I'd collect the report data into the question?

Please Log in to join the conversation.

More
2 years 4 months ago #123003 by DenisChenu
DenisChenu replied the topic: Are we able to view uploaded files within the notification email?

tpartner wrote: I think what Denis means is that he creates the "report" content for the email in a hidden (by CSS or JS) text-display question and then simply pipes that question into the email template. This may give some more flexibility with Expression Manager when creating the "report".

Hi,

It's not for fexilibility, it's for quick control ;) . And i directly use manual.limesurvey.org/QS:Hidden when it's OK.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
2 years 4 months ago #123007 by DOwen
DOwen replied the topic: Are we able to view uploaded files within the notification email?
Still struggling with this idea, I think I'm having a blank moment here!

Also, just figured out I had the root folder wrong so we have corrected that and made sure the permissions are all A-OK. However we've noticed that all uploaded files are being stored as random file names without any file extension, and simply stored as format 'File'.

Please Log in to join the conversation.

More
2 years 4 months ago #123041 by DOwen
DOwen replied the topic: Are we able to view uploaded files within the notification email?
So at the moment, I have an email working alright, it could be better, but it works, except for the upload file issue where the files are automatically renamed.

Is there a way to stop it renaming the files or similar?


Thanks!

Please Log in to join the conversation.

More
2 years 4 months ago #123043 by DenisChenu
DenisChenu replied the topic: Are we able to view uploaded files within the notification email?
Hi,

We need to rename the file :
- 1st : security issue (and actual solution is not good enough)
- 2nd : else another user can replace any file using same filename.

But the directlink with the fu_XXXX giv file access if user are connected to admin.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
2 years 4 months ago #123046 by DOwen
DOwen replied the topic: Are we able to view uploaded files within the notification email?
Hi Denis,

Thanks for your reply! However I don't quite understand what you mean...

Please Log in to join the conversation.

More
2 years 4 months ago #123076 by DenisChenu
DenisChenu replied the topic: Are we able to view uploaded files within the notification email?
1st : if we don't rename file, it's easy to find the URL, for example : ./surveys/files/curriculum_vitae.pdf can be found easily by any web user.
2nd: Iif we don't rename file : first user send CV.pdf, second user send CV.pdf, third user send CV.pdf .... we have only one file.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
2 years 4 months ago #123078 by DOwen
DOwen replied the topic: Are we able to view uploaded files within the notification email?
OK I understand. So it looks like there's no way of having a direct link inside the email to the correctly named file, primarily due to the fact that there could be multiple files of the same name. It's a shame the system couldn't simply rename any duplicate names to something like 'File.jpg' 'File_1.jpg' 'File_2.jpg' etc etc.

I guess the best way forward is to inform anyone receiving the form that they will need to click the link to save the file and always rename the file to the correct filename and file extension displayed inside the email. However this is likely to confuse some staff members.

Unless you have any other suggestions?

Please Log in to join the conversation.

More
2 years 4 months ago - 2 years 4 months ago #123080 by DenisChenu
DenisChenu replied the topic: Are we able to view uploaded files within the notification email?
Hi,

The last function github.com/LimeSurvey/LimeSurvey/blob/ma...n/responses.php#L858 give the good name when download by admin GUI.

Then you can do something like that for url, with GOOD EM to find the filename (maybe we need json_decode function in EM).
http://limesurvey.example.net/admin/responses/sa/actionDownloadfile/surveyid/{SID}/iResponseId/{SAVEDID}/sFileName/{stristr(str_replace('name":"', '', stristr(Upload1, 'name":"')), '"', 'true')}

But actually it's maybe better to use some extra Equation QUestion to find all the filenames.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 2 years 4 months ago by DenisChenu.

Please Log in to join the conversation.

More
2 years 4 months ago #123081 by DOwen
DOwen replied the topic: Are we able to view uploaded files within the notification email?
This sounds interesting. I'm guessing this basically links to the action to download the file at hand from the Admin GUI? However, would this mean that the person downloading the file would have to be Admin (and logged in)?

Please Log in to join the conversation.

More
2 years 4 months ago #123095 by DenisChenu
DenisChenu replied the topic: Are we able to view uploaded files within the notification email?
Using this system : yes : the user need to be loggued at admin.

But this can surely be done with a Plugin : BUT : need some authentification somewhere : else any user (even a robot) can get your file.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
2 years 4 months ago #123108 by DOwen
DOwen replied the topic: Are we able to view uploaded files within the notification email?
Aha, I'm not sure if it would be efficient to use this method as we will eventually be allowing lots of members of staff to access and collect data from the forms via email, but they won't be admin users.

I wouldn't know where to start when it comes to creating a plugin to allow this, so perhaps its proving a little too much work! Looks like we are best off settling with having to manually rename the files each time...

Please Log in to join the conversation.

More
4 months 2 weeks ago #157109 by Antonimo
Antonimo replied the topic: Are we able to view uploaded files within the notification email?
Hi,

I have come across this topic whilst trying to find a way to include links to uploaded files in the detailed admin notification e-mail.

I inserted the code into the template:
File uploaded: <a href="http://limesurvey.DOMAIN.co.uk/limesurvey/upload/surveys/{SID}/files/{stristr(str_replace('filename":"', '', stristr(upload1, 'filename":"')), '"', 'true')}">{stristr(str_replace('name":"', '', stristr(upload1, 'name":"')), '"', 'true')}</a>

The link in the e-mail contains lots of markup:
http://limesurvey.DOMAIN.co.uk/limesurvey/upload/surveys/299562/files/<span class='em-expression em-haveerror'><span title='Case-insensitive strstr; string stristr(haystack, needle [, before_needle=false])' class='em-function' >stristr</span>(<span title='Replace all occurrences of the search string with the replacement string; string str_replace(search,  replace, subject)' class='em-function' >str_replace</span>(<span title='' class='em-var-string'>'filename


I am using the Popup HTML editor in version 2.67.2+170719.

Can someone possibly me help to resolve this?

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!