addFile function not triggering image preview plugin to draw preview
See original GitHub issueI create an image file from a blob and use the addFile function
const imageFile = new File([filecontent], filename, { type: contentType });
this.filePond.addFile(imageFile);
the file gets added but the preview doesn’t render and debugging shows the image plugin code doesn’t get invoked
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Why are my Filepond uploads not working on Android devices ...
The issue turned out to be the image attachments on my Android device. Set up some checks for checking the file types and...
Read more >Using files from web applications - Web APIs - MDN Web Docs
Let's say you're developing the next great photo-sharing website and want to use HTML to display thumbnail previews of images before the user ......
Read more >Why is Preview not Working on Your Mac and How to Fix It?
Sometimes it happens that the Preview app does not work. For example, it won't open an image or load thumbnails.
Read more >Using the FileReader API to preview images in React
Images make up a significant proportion of data transmitted on the internet. More often than not, clients have to upload image files from...
Read more >Web IDE - GitLab Docs
On self-managed GitLab, by default this feature is not available. To make it available ... There are two ways to preview Markdown content...
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
I was doing something very convoluted
some of the plugins (the image size validation one for example) use URL.createObjectURL to generate the image object to get the height and width. with the above FileReader based method of creating the initial file, that image never actually loaded.
the following works fine (that image loads and height and width are calculated)
note the type needs to be set on the file to pass the File type validation plugin
thank you @kevduggan !!!