mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-18 00:55:35 +00:00
Allow a configurable input name in the FileInput plugin with a default of `files[]`. This functionality matches the Multipart plugin. Add basic unit tests for `inputName` FileInput constructor option.
12 lines
366 B
JavaScript
12 lines
366 B
JavaScript
import test from 'tape'
|
|
import FileInput from '../../../src/plugins/FileInput'
|
|
|
|
test('FileInput plugin: options', function (t) {
|
|
let fi = new FileInput()
|
|
t.equal(fi.opts.inputName, 'files[]', 'inputName defaults to files[]')
|
|
|
|
fi = new FileInput(null, { inputName: 'upload' })
|
|
t.equal(fi.opts.inputName, 'upload', 'inputName can be overridden')
|
|
|
|
t.end()
|
|
})
|