View Issue Details

This bug affects 1 person(s).
 18
IDProjectCategoryView StatusLast Update
15624Bug reportsData Entry (non public)public2020-12-23 17:42
Reporterdariocosta Assigned To 
PrioritynoneSeveritycrash 
Status closedResolutionfixed 
Product Version3.20.x 
Summary15624: File Upload not working for iOS 13.2
Description

When you try to upload a picture from the photo library or from camera, the form give you error, it seems like it doesn't recognise the mime type.

Steps To Reproduce

Add upload file question to your survey and access it with iOS device.

Additional Information

Versione di LimeSurvey
3.20.2
Build di LimeSurvey
191119
Sistema operativo
Windows NT SURVEYSERVER 10.0 build 14393 (Windows Server 2016) AMD64
PHP versione
7.2.14
Nome del web server
limesurvey.demobbl.it
Software del web server
Microsoft-IIS/10.0
Informazioni sul web server
HTTP/1.1
Driver del database
mysql
Versione del driver del database
mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $
Informazioni sul database server
Uptime: 17888140 Threads: 1 Questions: 4206452 Slow queries: 0 Opens: 2968 Flush tables: 1 Open tables: 1720 Queries per second avg: 0.235
Versione del database server
Uptime: 17888140 Threads: 1 Questions: 4206452 Slow queries: 0 Opens: 2968 Flush tables: 1 Open tables: 1720 Queries per second avg: 0.235

TagsNo tags attached.
Attached Files
Bug heat18
Complete LimeSurvey version number (& build)Versione 3.20.2+191119
I will donate to the project if issue is resolvedNo
BrowserSafari iOS
Database type & versionmysqlnd 5.0.12-dev - 20150407
Server OS (if known)
Webserver software & version (if known)
PHP Version7.2.14

Relationships

related to 15237 closedDenisChenu I can´t Upload 3gpp, amr, aac audio files using File Upload Question 
child of 14708 closedDenisChenu Upload files question type does not actually check file type 

Users monitoring this issue

dariocosta

Activities

galads

galads

2019-11-27 15:45

reporter   ~54824

I cannot reproduce this error on iOS 12.4.3 safari/Chrome browser

cdorin

cdorin

2019-11-27 15:46

reporter   ~54825

Last edited: 2020-04-14 17:25

@dariocosta, have you also tried the free hosting on limesurvey? Does it work there? If yes, it's a server configuration issue, most probably a permission system problem.

dariocosta

dariocosta

2019-11-27 16:45

reporter   ~54833

Last edited: 2020-04-14 17:25

Thanks for your reply.
I tried just now to create a test free hosting on your server, but the result is the same: unable to upload image.
You can try it here: https://testdpes.limequery.com/878551?lang=en
There's only one question, with the file upload. If you do it with PC no problem, but if you try with iOS (I've an iPhone XR with latest iOS 13.2 installed), you will be prompted with the message as in the screenshot.

prova.png (93,367 bytes)   
prova.png (93,367 bytes)   
cdorin

cdorin

2019-11-27 17:07

reporter   ~54834

Last edited: 2020-04-14 17:25

can you select the file? Is the file format correct? does the modal display some kind of preview when you do that? Is the upload stored in the response table or you remain stuck in file upload modal?

cdorin

cdorin

2019-11-27 17:08

reporter   ~54835

Last edited: 2020-04-14 17:25

@markusfluer, perhaps you can also take a look at it when you have time.

dariocosta

dariocosta

2019-11-27 17:11

reporter   ~54836

Last edited: 2020-04-14 17:25

When you click on select file, you are prompted to select the file. The photo library opens and you can select the image correctly, but when it comes back to the form, you receive this error and you remain stuck in this file upload modal.

cdorin

cdorin

2020-01-10 15:43

reporter   ~55195

Last edited: 2020-04-14 17:25

@dariocosta , does the issue still exist?

dariocosta

dariocosta

2020-01-10 17:49

reporter   ~55209

Last edited: 2020-04-14 17:25

Yes, it is. Do you have news?

Mazi

Mazi

2020-04-14 17:17

updater   ~57125

Last edited: 2020-04-14 17:25

@cdorin: I can reproduce this issue with LS 3.21 and iOS 13.4.1. When running a survey with a file upload question you can't pick an image from local storage.

See also https://www.limesurvey.org/forum/can-i-do-this-with-limesurvey/113379-heic-support-file-upload.

Mazi

Mazi

2020-04-14 17:23

updater   ~57126

Last edited: 2020-04-14 17:25

Allowing "heic" still leads to "Sorry, only .... files can be uploaded" error. So as stated at the bug tracker, probably some MIME type issue.

DenisChenu

DenisChenu

2020-04-15 09:28

developer   ~57128

Allowing "heic" still leads to "Sorry, only .... files can be uploaded" error. So as stated at the bug tracker, probably some MIME type issue.

With a know mimetype : you must have it in message.
https://github.com/LimeSurvey/LimeSurvey/blob/ed3dee4fba62968d4d4967b749a1eee1b02366a5/application/controllers/UploaderController.php#L207

Maybe extension is not set ? https://github.com/LimeSurvey/LimeSurvey/blob/ed3dee4fba62968d4d4967b749a1eee1b02366a5/application/controllers/UploaderController.php#L179

JHoeck

JHoeck

2020-05-05 11:23

reporter   ~57531

Fixed in bug/15624-file-upload-not-working-ios-13-2

dariocosta

dariocosta

2020-05-07 17:30

reporter   ~57619

@JHoeck : is it fixed?? In which release?
Regards

cdorin

cdorin

2020-05-07 18:01

reporter   ~57621

the fix is in the respective branch on github. The next release from Monday will contain it.

cdorin

cdorin

2020-05-13 17:48

reporter   ~57761

Hello @dariocosta, could you please checkout this branch: bug/15624-file-upload-not-working-ios-13-2 ?

dariocosta

dariocosta

2020-05-14 11:31

reporter   ~57775

Hello @cdorin ,
I checked out the branch and uploaded in a subfolder on our survey server.
I tested it, but unfortunately I have problem... it seems iOS try to upload JPEG file and this extension is not allowed.
If you want to test, you can try here: http://limesurvey.demobbl.it/NewRelease/index.php?r=survey/index&sid=297842&lang=it

image0.png (343,900 bytes)
DenisChenu

DenisChenu

2020-05-14 11:38

developer   ~57776

When add jpg : it's bet to add jpe and jpeg extension too …

dariocosta

dariocosta

2020-05-14 11:42

reporter   ~57777

@DenisChenu do you mean in limesurvey code or in question editor form?

DenisChenu

DenisChenu

2020-05-14 11:47

developer   ~57778

question editor form :)

https://manual.limesurvey.org/Question_type_-_File_upload#Allowed_file_types_.28allowed_filetypes.29

png,gif,jpg,jpe,jpeg for web image.

Maybe we can improve to update jpg to jpe+jpeg , or to have some 'dropdpown' selector like

  • image (png,gif,jpg,jpe,jpeg)
  • text (pdf,epub)
  • editable text (odt,doc,,docx)
  • etc …

But this need analyses and developed before

dariocosta

dariocosta

2020-05-14 12:05

reporter   ~57781

@DenisChenu Sorry... but I modified the default set [ png, gif, doc, odt, jpg, pdf, png, heic ] to [ png, gif, doc, odt, jpg, jpe, jpeg, pdf, png, heic ], saved the survey and re-enabled it, but when I try to upload the image, a popup appear "IMPOSSIBILE VERIFICARE L'ESTENSIONE DI QUESTO TIPO DI FILE", unable to verify extension of this file.
This happen also using the desktop browser.

cdorin

cdorin

2020-05-14 17:45

reporter   ~57808

@Mazi, can you please double check the fix provided by @JHoeck? Branch: bug/15624-file-upload-not-working-ios-13-2

Mazi

Mazi

2020-05-14 18:02

updater   ~57811

@cdorin, sorry, currently I can't help with this. Once the kindergarten is opened again and I do not need to combine home office + home schooling + entertaining our young daughter, I should have sufficient time to test such things.

cdorin

cdorin

2020-05-14 18:13

reporter   ~57812

Ok, that sounds ... extremely busy ^^ . Asked JEssica to double check and see if we can find any other issue in LS3. Seems in LS4 is fixed.

ollehar

ollehar

2020-05-15 15:45

administrator   ~57841

Last edited: 2020-05-15 15:45

Does anyone (except Dorin) have time to test this? You have to checkout the branch bug/15624-file-upload-not-working-ios-13-2.

ollehar

ollehar

2020-05-15 15:50

administrator   ~57842

You can find the filetype here: https://filesamples.com/formats/heic

DenisChenu

DenisChenu

2020-05-15 16:24

developer   ~57843

Last edited: 2020-05-15 16:24

I check hacking a 3.X :

  1. Set available file to , heic
  2. Update framework/utils/mimeTypes.php

receive « Désolé, les fichiers du type application/octet-stream (extension bin) ne sont pas autorisés.»
debian9 for /etc/mime …
PHP Version 7.0.33-12
Outdated magic_database ?
Link : https://demo.sondages.me/87986

Then test on my local
« Sorry, unable to check extension of this file type image/heif.» after checkout …

Fedora 31 / PHP Version 7.3.17
(i don't understand why i receive this error … magic_database seems OK here ?)

ollehar

ollehar

2020-05-15 16:25

administrator   ~57844

No fix is applied to LS3 at the moment, only to the branch listed above by me.

DenisChenu

DenisChenu

2020-05-15 16:31

developer   ~57845

To fix it in master (with PHP 7.3 and a updated magic_database):
Add

    'image/heif' => 'heif',
    'image/heif-sequence' => 'heifs',
    'image/heic' => 'heic',
    'image/heic-sequence' => 'heics',

in https://github.com/LimeSurvey/LimeSurvey/blob/master/framework/utils/fileExtensions.php

And set extension to heic,heif (the heic file return heif for me …)

DenisChenu

DenisChenu

2020-05-15 16:33

developer   ~57846

No fix is applied to LS3 at the moment, only to the branch listed above by me.

Hacked version …
I think it can be fixed in 3.X (for upload question type) just updating fileExtensions.php (if magic_database is up to date).
You want a proof ?

ollehar

ollehar

2020-05-15 16:36

administrator   ~57847

You also need to add a new mime type, " Sorry, file type application/octet-stream (extension : bin) is not allowed!".

We'll include this in next sprint on Monday again.

DenisChenu

DenisChenu

2020-05-15 16:52

developer   ~57848

You also need to add a new mime type, " Sorry, file type application/octet-stream (extension : bin) is not allowed!".

This one is for older magic.mime

Maybe we need to allow deactivate filetype ? In config;php ?

DenisChenu

DenisChenu

2020-05-15 16:53

developer   ~57849

@ollehar :

You also need to add a new mime type, " Sorry, file type application/octet-stream (extension : bin) is not allowed!".

With an outdated magic.mime

If it's up to date : « Sorry, unable to check extension of this file type image/heif.»

DenisChenu

DenisChenu

2020-05-15 17:12

developer   ~57850

https://github.com/LimeSurvey/LimeSurvey/pull/1421 ;)

cdorin

cdorin

2020-05-18 13:23

reporter   ~57875

Jessica's fix is good for LS4: Since we need to release, I created a separate bug for it: 16289.
We will use this/current ticket to discuss about the issue in LS3

JHoeck

JHoeck

2020-05-18 13:45

reporter   ~57877

So the pr by denis is not working. The text for the allowed files is not updated (no heif or heic) and also i tried to upload a picture (.heic) file, its not working. So WIP for LS3.

DenisChenu

DenisChenu

2020-05-18 14:16

developer   ~57879

@JHoceck : what exact sentence ?

It work for LS3 with an updated file config (current default are doc+pdf + web image) + up to date ùagic.mgc file. I can sed you , but more tha 5 MO

JHoeck

JHoeck

2020-05-18 17:09

reporter   ~57888

123134.PNG (8,034 bytes)   
123134.PNG (8,034 bytes)   
DenisChenu

DenisChenu

2020-05-18 17:37

developer   ~57890

Yes : ypou need to manually update https://manual.limesurvey.org/Question_type_-_File_upload#Allowed_file_types_.28allowed_filetypes.29

I don't think it's a good idea to update it in 3.X LTS version

lime_release_bot

lime_release_bot

2020-05-19 11:49

administrator   ~57911

Fixed in Release 3.22.16+200519

cdorin

cdorin

2020-05-19 11:51

reporter   ~57912

I reopened it - not sure if it is fixed properly. Needs to be double checked

dariocosta

dariocosta

2020-05-19 13:50

reporter   ~57922

I've just tested the LS4 (issue 16289) and the problem is not fixed...

DenisChenu

DenisChenu

2020-05-19 13:51

developer   ~57923

@dariocosta can you please check (3.X) here : https://demo.sondages.pro/index.php/186164

https://github.com/LimeSurvey/LimeSurvey/pull/1421

dariocosta

dariocosta

2020-05-19 13:56

reporter   ~57924

@DenisChenu sorry, same problem

INBOX%3E142861.jpg (126,668 bytes)
ollehar

ollehar

2020-05-19 14:21

administrator   ~57925

Last edited: 2020-05-19 14:21

@dariocosta thank you for testing. can you please edit the bug report and add an idiot-safe description of how you tested the bug? right now I think we're all testing in different ways. Please use the form:

  1. Create survey (or import lss)
  2. Activate
  3. Click this
  4. Click that
  5. ...
    x. Result - bug

etc

Thank you.

DenisChenu

DenisChenu

2020-05-19 14:38

developer   ~57927

No information about image format ?????

dariocosta

dariocosta

2020-05-19 14:40

reporter   ~57929

@ollehar sorry, but I'm not able to edit the bug report, I have no edit button.
The test is simple:

  • Create survey
  • Create question group
  • Add the file upload question under this group
  • Enable the survey
  • Access survey url from iPhone
  • Try to upload a picture from iPhone library

That's all...

dariocosta

dariocosta

2020-05-19 14:41

reporter   ~57930

Just for info, right now my iPhone has firmware 13.4.1

cdorin

cdorin

2020-05-26 13:01

reporter   ~58033

To upload a picture from iphone library, I needed to add jpeg as well. Heic is/was not necessary.

Everything runs perfectly on master (updated via CU) with my apple device (firmware: 13.5).

cdorin

cdorin

2020-05-26 13:05

reporter   ~58034

Last edited: 2020-05-26 13:11

@dariocosta, can you upload files here:

https://ls2.dorinchiritoiu.eu/index.php?r=survey/index&sid=731796&lang=en ?
and
https://ls1.dorinchiritoiu.eu/index.php?r=survey/index&sid=177276&lang=en

Allowed file types: png, gif, doc, odt, jpg, pdf, png, jpeg

dariocosta

dariocosta

2020-05-26 16:04

reporter   ~58045

Sorry @cdorin but these survey are not online... do you have removed them?

DenisChenu

DenisChenu

2020-05-26 16:24

developer   ~58047

You must fix the url & amp ; to & only :)

Check
https://frama.link/1xKdHFfR and https://frama.link/yL7xt5ns

dariocosta

dariocosta

2020-05-27 15:53

reporter   ~58057

Perfect! It's working.
Which version is this?

cdorin

cdorin

2020-05-27 15:56

reporter   ~58058

It is the latest (4.2.5 via CU)

Please double check allowed file types. Mines are: png, gif, doc, odt, jpg, pdf, png, jpeg .

Perhaps jpeg needs to be added in both versions -> I will come back with a small comment if that is the case (need to double check).

Mazi

Mazi

2020-05-27 17:08

updater   ~58059

@cdorin, since this issue was reported for LS 3.x, I assume it will also be fixed there?

dariocosta

dariocosta

2020-05-28 10:17

reporter   ~58068

@cdorin I really don't understand :(
I uploaded now version 4.2.5+200526 on our server, but the problem is always there:

http://limesurvey.demobbl.it/NewRelease/index.php?r=survey/index&sid=668183&lang=it

Probably I'm doing something wrong...

Mazi

Mazi

2020-06-09 13:56

updater   ~58224

@cdorin, what is the expected time frame for a fix?

ollehar

ollehar

2020-06-09 14:00

administrator   ~58225

Wasn't this already fixed? oO

cdorin

cdorin

2020-06-09 14:14

reporter   ~58226

Last edited: 2020-06-09 14:14

It is fixed on most of the installations (LS3 and LS4).

But I didn't have proper time to check why @dariocosta's installation is not working.

I will try later with different versions of php (unfortunately, can't test on windows server)

Mazi

Mazi

2020-06-10 17:26

updater   ~58241

We have successfully tested this at the latest LS 3.22.x version.

dariocosta

dariocosta

2020-06-15 16:20

reporter   ~58291

@cdorin I really don't know what happens to my install.... today I completely cleaned up it, I've just hold the config folder and copied latest files ( 4.2.8+200608 ), recreate a survey ( http://limesurvey.demobbl.it/NewRelease/index.php?r=survey/index&sid=772818&lang=it ) but no guess... unable to verify file extension.

cdorin

cdorin

2020-07-09 16:36

reporter   ~58865

@dariocosta, any news about this issues? Was one of the later updates solving the problem?

dariocosta

dariocosta

2020-07-09 21:05

reporter   ~58882

@cdorin sorry, but after that test I had no time to do other tests.
I will try next week and give you feedback.

Issue History

Date Modified Username Field Change
2019-11-26 18:48 dariocosta New Issue
2019-11-27 15:45 galads Note Added: 54824
2019-11-27 15:46 cdorin Note Added: 54825
2019-11-27 16:45 dariocosta File Added: prova.png
2019-11-27 16:45 dariocosta Note Added: 54833
2019-11-27 17:07 cdorin Note Added: 54834
2019-11-27 17:08 cdorin Note Added: 54835
2019-11-27 17:11 dariocosta Note Added: 54836
2020-01-10 15:43 cdorin Note Added: 55195
2020-01-10 15:44 cdorin Assigned To => cdorin
2020-01-10 15:44 cdorin Status new => feedback
2020-01-10 17:49 dariocosta Note Added: 55209
2020-01-10 17:49 dariocosta Status feedback => assigned
2020-04-14 17:17 Mazi Note Added: 57125
2020-04-14 17:23 Mazi Note Added: 57126
2020-04-14 17:25 cdorin Zoho Sprints => |Yes|
2020-04-14 17:25 swendrich Zoho Sprints ID => 14469000000039001
2020-04-15 09:28 DenisChenu Note Added: 57128
2020-04-21 09:05 JHoeck Assigned To cdorin => JHoeck
2020-05-04 13:19 JHoeck Status assigned => confirmed
2020-05-05 11:23 JHoeck Status confirmed => resolved
2020-05-05 11:23 JHoeck Resolution open => fixed
2020-05-05 11:23 JHoeck Note Added: 57531
2020-05-07 17:30 dariocosta Note Added: 57619
2020-05-07 18:01 cdorin Note Added: 57621
2020-05-13 17:48 cdorin Note Added: 57761
2020-05-14 11:31 dariocosta Note Added: 57775
2020-05-14 11:31 dariocosta File Added: image0.png
2020-05-14 11:38 DenisChenu Note Added: 57776
2020-05-14 11:42 dariocosta Note Added: 57777
2020-05-14 11:47 DenisChenu Note Added: 57778
2020-05-14 12:05 dariocosta Note Added: 57781
2020-05-14 17:45 cdorin Note Added: 57808
2020-05-14 18:02 Mazi Note Added: 57811
2020-05-14 18:13 cdorin Note Added: 57812
2020-05-15 15:45 ollehar Status resolved => ready for testing
2020-05-15 15:45 ollehar Note Added: 57841
2020-05-15 15:45 ollehar Note Edited: 57841
2020-05-15 15:50 ollehar Note Added: 57842
2020-05-15 16:24 DenisChenu Note Added: 57843
2020-05-15 16:24 DenisChenu File Added: Capture d’écran du 2020-05-15 16-21-53.png
2020-05-15 16:24 DenisChenu Note Edited: 57843
2020-05-15 16:25 ollehar Note Added: 57844
2020-05-15 16:31 DenisChenu Note Added: 57845
2020-05-15 16:33 DenisChenu Note Added: 57846
2020-05-15 16:36 ollehar Note Added: 57847
2020-05-15 16:52 DenisChenu Note Added: 57848
2020-05-15 16:53 DenisChenu Note Added: 57849
2020-05-15 17:12 DenisChenu Note Added: 57850
2020-05-15 17:14 DenisChenu Relationship added related to 15237
2020-05-15 17:15 DenisChenu Relationship added child of 14708
2020-05-18 13:23 cdorin Status ready for testing => confirmed
2020-05-18 13:23 cdorin Zoho Sprints Yes => |Yes|
2020-05-18 13:23 cdorin Note Added: 57875
2020-05-18 13:45 JHoeck Note Added: 57877
2020-05-18 14:16 DenisChenu Note Added: 57879
2020-05-18 17:09 JHoeck Note Added: 57888
2020-05-18 17:09 JHoeck File Added: 123134.PNG
2020-05-18 17:37 DenisChenu Note Added: 57890
2020-05-19 11:49 lime_release_bot Zoho Sprints Yes => |Yes|
2020-05-19 11:49 lime_release_bot Note Added: 57911
2020-05-19 11:49 lime_release_bot Status confirmed => closed
2020-05-19 11:51 cdorin Status closed => confirmed
2020-05-19 11:51 cdorin Zoho Sprints Yes => |Yes|
2020-05-19 11:51 cdorin Note Added: 57912
2020-05-19 13:50 dariocosta Note Added: 57922
2020-05-19 13:51 DenisChenu Note Added: 57923
2020-05-19 13:56 dariocosta Note Added: 57924
2020-05-19 13:56 dariocosta File Added: INBOX%3E142861.jpg
2020-05-19 14:21 ollehar Note Added: 57925
2020-05-19 14:21 ollehar Note Edited: 57925
2020-05-19 14:21 ollehar Note Edited: 57925
2020-05-19 14:33 dariocosta Issue Monitored: dariocosta
2020-05-19 14:33 dariocosta Issue End Monitor: dariocosta
2020-05-19 14:33 dariocosta Issue Monitored: dariocosta
2020-05-19 14:38 DenisChenu Note Added: 57927
2020-05-19 14:40 dariocosta Note Added: 57929
2020-05-19 14:41 dariocosta Note Added: 57930
2020-05-26 13:01 cdorin Note Added: 58033
2020-05-26 13:05 cdorin Note Added: 58034
2020-05-26 13:05 cdorin Note Edited: 58034
2020-05-26 13:06 cdorin Note Edited: 58034
2020-05-26 13:11 cdorin Note Edited: 58034
2020-05-26 16:04 dariocosta Note Added: 58045
2020-05-26 16:24 DenisChenu Note Added: 58047
2020-05-26 16:24 DenisChenu Assigned To JHoeck => cdorin
2020-05-26 16:24 DenisChenu Status confirmed => feedback
2020-05-27 15:53 dariocosta Note Added: 58057
2020-05-27 15:53 dariocosta Status feedback => assigned
2020-05-27 15:56 cdorin Note Added: 58058
2020-05-27 17:08 Mazi Note Added: 58059
2020-05-28 10:17 dariocosta Note Added: 58068
2020-06-09 13:56 Mazi Note Added: 58224
2020-06-09 14:00 ollehar Note Added: 58225
2020-06-09 14:14 cdorin Note Added: 58226
2020-06-09 14:14 cdorin Note Edited: 58226
2020-06-10 17:26 Mazi Note Added: 58241
2020-06-15 16:20 dariocosta Note Added: 58291
2020-07-09 16:36 cdorin Assigned To cdorin =>
2020-07-09 16:36 cdorin Status assigned => feedback
2020-07-09 16:36 cdorin Note Added: 58865
2020-07-09 21:05 dariocosta Note Added: 58882
2020-07-09 21:05 dariocosta Status feedback => new
2020-12-23 17:42 cdorin Status new => closed
2021-08-02 16:08 guest Bug heat 16 => 18