mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Grafana DS: Limit dropzone to spreadsheet filetypes (#62329)
* Grafana DS: Limit dropzone to spreadsheet filetypes
This commit is contained in:
parent
355dc66bd9
commit
0bfdc42ffe
@ -398,7 +398,18 @@ export class UnthemedQueryEditor extends PureComponent<Props, State> {
|
||||
<FileDropzone
|
||||
readAs="readAsArrayBuffer"
|
||||
fileListRenderer={this.fileListRenderer}
|
||||
options={{ onDropAccepted: this.onDropAccepted, maxSize: 200000, multiple: false }}
|
||||
options={{
|
||||
onDropAccepted: this.onDropAccepted,
|
||||
maxSize: 200000,
|
||||
multiple: false,
|
||||
accept: {
|
||||
'text/plain': ['.csv', '.txt'],
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': ['.xlsx'],
|
||||
'application/vnd.ms-excel': ['.xls'],
|
||||
'application/vnd.apple.numbers': ['.numbers'],
|
||||
'application/vnd.oasis.opendocument.spreadsheet': ['.ods'],
|
||||
},
|
||||
}}
|
||||
onLoad={this.onFileDrop}
|
||||
>
|
||||
<FileDropzoneDefaultChildren primaryText={this.props?.query?.file ? 'Replace file' : 'Upload file'} />
|
||||
|
Loading…
Reference in New Issue
Block a user