File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,13 +55,13 @@ public struct RequestCreator {
5555 let operationData = try serializationFormat. serialize ( value: fields)
5656 formData. appendPart ( data: operationData, name: " operations " )
5757
58- var map = [ String: String] ( )
58+ var map = [ String: [ String] ] ( )
5959 if files. count == 1 {
6060 let firstFile = files. first!
61- map [ firstFile. originalName] = " [ variables.\( firstFile. fieldName) ] "
61+ map [ firstFile. originalName] = [ " variables. \( firstFile. fieldName) " ]
6262 } else {
6363 for (index, file) in files. enumerated ( ) {
64- map [ file. originalName] = " [ variables.\( file. fieldName) . \( index) ] "
64+ map [ file. originalName] = [ " variables. \( file. fieldName) . \( index) " ]
6565 }
6666 }
6767
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ Content-Disposition: form-data; name="operations"
184184--TEST.BOUNDARY
185185Content-Disposition: form-data; name= " map "
186186
187- { " a.txt " : " [ variables.upload] " }
187+ { " a.txt " :[ " variables.upload " ] }
188188--TEST.BOUNDARY
189189Content-Disposition: form-data; name= " upload " ; filename= " a.txt "
190190Content-Type: text/plain
@@ -200,7 +200,7 @@ Alpha file content.
200200--TEST.BOUNDARY
201201Content-Disposition: form-data; name= " map "
202202
203- { " a.txt " : " [ variables.upload] " }
203+ { " a.txt " :[ " variables.upload " ] }
204204--TEST.BOUNDARY
205205Content-Disposition: form-data; name= " upload " ; filename= " a.txt "
206206Content-Type: text/plain
@@ -246,7 +246,7 @@ Content-Disposition: form-data; name="operations"
246246--TEST.BOUNDARY
247247Content-Disposition: form-data; name= " map "
248248
249- { " a.txt " : " [ variables.uploads.0] " , " b.txt " : " [ variables.uploads.1] " }
249+ { " a.txt " :[ " variables.uploads.0 " ] ," b.txt " :[ " variables.uploads.1 " ] }
250250--TEST.BOUNDARY
251251Content-Disposition: form-data; name= " uploads " ; filename= " a.txt "
252252Content-Type: text/plain
You can’t perform that action at this time.
0 commit comments