Welcome to the LimeSurvey Community Forum

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

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

  • DOwen
  • DOwen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 7 months ago #123078 by DOwen
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?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 7 months ago - 8 years 7 months ago #123080 by DenisChenu
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).
Code:
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 , plugin development .
I don't answer to private message.
Last edit: 8 years 7 months ago by DenisChenu.
The topic has been locked.
  • DOwen
  • DOwen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 7 months ago #123081 by DOwen
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)?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 7 months ago #123095 by DenisChenu
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 , plugin development .
I don't answer to private message.
The topic has been locked.
  • DOwen
  • DOwen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 7 months ago #123108 by DOwen
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...
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose