nextcloud / forms

📝 Simple form & survey app for Nextcloud
https://apps.nextcloud.com/apps/forms
GNU Affero General Public License v3.0
316 stars 97 forks source link

Bug. Question type File. When multiple types are selected, only one is used. #2241

Closed AIlkiv closed 2 months ago

AIlkiv commented 2 months ago
foreach ($question['extraSettings']['allowedFileTypes'] as $type) {
    $question['accept'] = array_keys(array_filter($aliases, function (string $alias) use ($type) {
        return $alias === $type;
    }));
}

At each iteration, $question['accept'] is overwritten

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 46.34%. Comparing base (96e6790) to head (e98906d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2241 +/- ## ============================================ + Coverage 46.03% 46.34% +0.30% + Complexity 800 799 -1 ============================================ Files 66 66 Lines 3065 3064 -1 ============================================ + Hits 1411 1420 +9 + Misses 1654 1644 -10 ```
Chartman123 commented 2 months ago

@AIlkiv would you like to join our Forms team on cloud.nextcloud.com? If yes, I could help you get an account there as well...

AIlkiv commented 1 month ago

@AIlkiv would you like to join our Forms team on cloud.nextcloud.com? If yes, I could help you get an account there as well...

@Chartman123 Yes. Please help me with that.