Welcome to the LimeSurvey Community Forum

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

Question type "File Upload" - Problems with unsupported file types

  • seccalisca
  • seccalisca's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 months 2 weeks ago #267868 by seccalisca
Your version of LimeSurvey: LimeSurvey Community Edition - Version 5.6.68+240625
Own server or LimeSurvey Cloud: Own server
==================
Hi everyone,
I have created a form with limesurvey, where the user has to upload an electronically signed file in PDF or P7M format.
To do this I used the ‘File upload’ question type made available by Limesurvey.
For PDF files I had no problem, but for P7M files there was no way, I always get this message :
‘The file type application/octet-stream (extension: bin) is not allowed!’.
Searching on intenet it seems that the MIME type for P7Ms may not be interpreted correctly because this configuration on the web server is missing
Code:
application/pkcs7-mime.
Together with fellow system administrators we have tried various attempts by adding the MIME type to various files (htaccess, config.php, etc.) but without result.
I would like to know if anyone has already been through this and found a safe solution.
Thank you all

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
2 months 2 weeks ago #267918 by DenisChenu
Theoretically: there is a solution
  1. Get a valid magic_database (see finfo_open PHP function ) with your application/pkcs7-mime
  2. Set [url=https://application/pkcs7-mime.]the P7M to application/pkcs7-mime. in a PHP file[/url]
  3. Update your config.php to use both of file

When I add this solution, I replace the Old Debian magic_database for a newer magic_database from Fedora, I don't remind the issue, but it allows to work for newer file type. If you manage the server : try to replace it globally on your PHP version.

Maybe you can try with

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose