[bootstrap-4] File uploads result in error ".file should match format "data-url""
See original GitHub issuePrerequisites
- I have read the documentation;
- In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.
- Ideally, I’m providing a sample JSFiddle or a shared playground link demonstrating the issue.
Description
Using the bootstrap-4
theme, submitting a file triggers an error:
.file should match format "data-url"
Steps to Reproduce
- Playground link
- Click “Choose file” for the first file upload
- Select any file from your computer
- Click “Submit”
Expected behavior
No errors are displayed.
Actual behavior
The following error is displayed:
.file should match format "data-url"
Version
master
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:15 (6 by maintainers)
Top Results From Across the Web
bootstrap 4 file input doesn't show the file name - Stack Overflow
I have a problem with the custom-file-input class in Bootstrap 4. after I chose which file I want to upload the filename do...
Read more >Bootstrap File Input Options - © Kartik - Krajee JQuery Plugins
All the options to the bootstrap file input plugin can be passed ... This will display the upload statistics typically below the file...
Read more >File Upload With Bootstrap File Input - CodePen
Bootstrap File Input is a field which the user can use to upload one or more files (photos, documents or any other file...
Read more >Visual CUT User Manual - Millet Software
The first export file extension should match the export format selected for the ... Visual CUT would export the reports directly to shared...
Read more >convert image file to base64 js Code Example - Code Grepper
function dataURLtoFile(dataurl, filename) { var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1], bstr = atob(arr[1]), n = bstr.length, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Hasenn I worked around it using this:
I first created a widget in my repo called BootstrapFileWidget and reference the FileWidget from core:
Then i popped that into the widgets
Then, made sure my file was using that widget:
Not the cleanest workaround, but it got me up in running in a few minutes
Also see https://github.com/rjsf-team/react-jsonschema-form/issues/2418 for more context