prepare for file upload in swagger-js

This commit is contained in:
Tony Tam
2015-02-21 00:25:56 -08:00
committed by Mohsen Azimi
parent c0abd35191
commit 63f2f09cfd

View File

@@ -195,6 +195,7 @@ class OperationView extends Backbone.View
if(o.value? && jQuery.trim(o.value).length > 0) if(o.value? && jQuery.trim(o.value).length > 0)
map[o.name] = o.value map[o.name] = o.value
if o.type is "file" if o.type is "file"
map[o.name] = o.files[0]
isFileUpload = true isFileUpload = true
for o in form.find("textarea") for o in form.find("textarea")