mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
Feature: upload customization settings from a file #256
This commit is contained in:
@@ -32,7 +32,8 @@ const SingleUpload: FC<SingleUploadProps> = ({ onDrop, onCancel, uploading, prog
|
||||
const dropzoneState = useDropzone({
|
||||
onDrop,
|
||||
accept: {
|
||||
'application/octet-stream': ['.bin']
|
||||
'application/octet-stream': ['.bin'],
|
||||
'application/json': ['.json']
|
||||
},
|
||||
disabled: uploading,
|
||||
multiple: false
|
||||
|
||||
@@ -42,7 +42,7 @@ const useFileUpload = ({ upload }: MediaUploadOptions) => {
|
||||
cancelToken: cancelToken.token
|
||||
});
|
||||
resetUploadingStates();
|
||||
enqueueSnackbar('Upload successful', { variant: 'success' });
|
||||
enqueueSnackbar('File uploaded', { variant: 'success' });
|
||||
} catch (error: unknown) {
|
||||
if (axios.isCancel(error)) {
|
||||
enqueueSnackbar('Upload aborted', { variant: 'warning' });
|
||||
|
||||
Reference in New Issue
Block a user