kibana/packages/shared-ux/file/file_upload/impl
Vadim Kibana 2f1c2fa3e7
[Files] Validate mime type when files are selected (#159503)
## Summary

Closes https://github.com/elastic/kibana/issues/155168


### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-15 13:17:55 +02:00
..
src [Files] Validate mime type when files are selected (#159503) 2023-06-15 13:17:55 +02:00
index.tsx
jest.config.js
kibana.jsonc [codeowners] rename global experience to @elastic/appex-sharedux 2023-01-18 10:02:49 -07:00
package.json Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
README.mdx
tsconfig.json Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00

---
id: sharedUX/Components/FileUpload
slug: /shared-ux/components/file-upload
title: File upload
description: Upload file(s) to Kibana.
tags: ['shared-ux', 'component', 'files']
date: 2022-11-22
---

## Description

A wrapper around `<EuiFilePicker />` that provides state management for the upload process using the `FileClient`.

## Usage

Must be wrapped in the `FilesContext`.

```tsx
<FilesContext ...>
  <FileUpload ... />
</FilesContext>
```

## Variants

### Default

The default layout should sit nicely in a form, modal or flyout.

### Compressed

When space is constrained you can render a smaller version of the UI by passing the `compressed` prop. This variant will be smaller in size, and start uploading a file immediately once it receives it.