mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 13:39:19 -06:00
8048a66e90
* drag files to dashboard * use file name as panel title * add file size limitation, file type limitation and error handling * Refactor file parsing for code sharing move accepted types and max size to file-import constants show which file types are allowed in file type error * update codeowners * Adjust max size to 1mb
14 lines
466 B
TypeScript
14 lines
466 B
TypeScript
import { Accept } from 'react-dropzone';
|
|
|
|
export const acceptedFiles: 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'],
|
|
'application/json': ['.json'],
|
|
};
|
|
|
|
//This should probably set from grafana conf
|
|
export const maxFileSize = 1000000;
|