scitran / core

RESTful API
https://scitran.github.io
MIT License
18 stars 18 forks source link

Fix handling of multi-value file fields #1078

Closed ehlertjd closed 6 years ago

ehlertjd commented 6 years ago

Some clients (e.g. Swagger), rather than specifying file1, file2, etc... will specify multiple values for file when uploading multiple files. This code change will handle lists of values for individual fields.

Review Checklist

codecov-io commented 6 years ago

Codecov Report

Merging #1078 into master will increase coverage by 0.01%. The diff coverage is 100%.

@@            Coverage Diff            @@
##           master   #1078      +/-   ##
=========================================
+ Coverage   90.79%   90.8%   +0.01%     
=========================================
  Files          50      50              
  Lines        7019    7029      +10     
=========================================
+ Hits         6373    6383      +10     
  Misses        646     646
kofalt commented 6 years ago

This change is confusing to me, because I know for a fact that multiple file fields has worked with this logic in the past. Do you have a curl that will fail on master and succeed with this PR?

ehlertjd commented 6 years ago

@kofalt The modified integration test fails on master and succeeds on this PR.

nagem commented 6 years ago

LGTM!