<commit_before># Form File Input

> Customized, cross-browser consitant, file input control that supports single file,
multiple files, and directory upload (for browsers that support directory mode)

For cross browser consistency, Form file defaults to the Bootstrap custom file
input to replace the browser defaults. They’re built on top of semantic and accessible
markup, so it is a solid replacement for the default file input.

### Single file (default)
On single file mode, when no file is selected or user cancels Browse dialog, `v-model` is `null`
indicating no file selected.

### Multiple files
Multiple file uploading is supported by adding `multiple` prop to component.
In this case `v-model` is *always* an `Array`.   

### Directory mode
By adding `directory` prop, the user can select directories instead of files.
When a directory is selected, the directory and its entire hierarchy of contents are included in the set of selected items.
The selected file system entries can be obtained using the `webkitEntries` property. 

**CAUTION** This is a non standard feature while being supported by latest Firefox and Chrome versions, and should not 
be relied for production.
[Read more on MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory)

### Drag and Drop
Drop mode is enabled by default. it can disabled by setting the `no-drop` prop.

### Customizations<commit_msg>[form-file] Accept prop documentation<commit_after># Form File Input

> Customized, cross-browser consitant, file input control that supports single file,
multiple files, and directory upload (for browsers that support directory mode)

For cross browser consistency, Form file defaults to the Bootstrap custom file
input to replace the browser defaults. They’re built on top of semantic and accessible
markup, so it is a solid replacement for the default file input.

### Single file (default)
On single file mode, when no file is selected or user cancels Browse dialog, `v-model` is `null`
indicating no file selected. When a file is selected the return value will be a javascript
[`File`](https://developer.mozilla.org/en/docs/Web/API/File) object instance.

### Multiple files
Multiple file uploading is supported by adding `multiple` prop to component.
In this case `v-model` is *always* an `Array`.  When no files are selected, an emopty array
will be returnd. When a file or files are selected the return value will be and aarray of
javascript [`File`](https://developer.mozilla.org/en/docs/Web/API/File) object instances.

### Directory mode
By adding `directory` prop, the user can select directories instead of files.
When a directory is selected, the directory and its entire hierarchy of contents are included in the set of selected items.
The selected file system entries can be obtained using the `webkitEntries` property. 

**CAUTION** This is a non standard feature while being supported by latest Firefox and Chrome versions, and should not 
be relied for production.
[Read more on MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory)

### Drag and Drop
Drop mode is enabled by default. it can disabled by setting the `no-drop` prop.

### Accept
You can limit the file types by setting the `accept` prop to a string containing the
allowed file type. To specify more than one value, separate the values with a comma.

```html
<!-- Accept all image formats by IANA media type wildcard-->
<b-form-file accept="image/*"></b-form-file>

<!-- Accept specific image formats by IANA type -->
<b-form-file accept="image/jpeg, image/png, image/gif"></b-form-file>

<!-- Accept specific image formats by extension -->
<b-form-file accept=".jpg, .png, .gif"></b-form-file>
```

To accept any file type, leve `accept` as null (default). You can mix and match IAMA
media types and extensions.

Refer to [IANA Media Types](http://www.iana.org/assignments/media-types/) for a complete
list of standard media types.

### Customizations
{'fraction_non_alphanumeric': 0.08051166290443942, 'fraction_numerical': 0.0, 'mean_word_length': 4.577622377622378, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 14, 'https://': 4, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3292936', 'n_tokens_mistral': 1050, 'n_tokens_neox': 1000, 'n_words': 545}