grillwork / react-file-reader Goto Github PK
View Code? Open in Web Editor NEWFlexible ReactJS component for handling styled HTML file inputs
License: MIT License
Flexible ReactJS component for handling styled HTML file inputs
License: MIT License
the uuid
package can be avoided, it will add extra 700KB (including crypto polyfil for browser) to the bundle size when the component is built with webpack
created pull request for this issue
Hello,
Thanks for your package
Unfortunately, we can't specify multiple filetypes
Hi, first of all thanks for creating and sharing this component.
I noticed that if you select a file the handleFiles listener is called as expected, however, if I retry the action of selecting the same file to upload, handleFiles won't get called.
I double checked this behaviour on your demo page. You can check it too by selecting a file with the console open, then clearing the messages in the console and retrying the process. You will notice that no new messages are shown after selecting the same file.
As a side note, selecting the same image to upload doesn't make much sense, however it's important for my users to select the same file several times.
Hi,
version 1.1.4
There is a problem with the uuid dependency. While the application is running occurs an error as below:
index.js:44 Uncaught TypeError: (0 , _uuid2.default) is not a function
at new ReactFileReader (index.js:44)
Maybe should you froze the version of this dependency or remove it?
It is a major issue. Is there a chance to fix this bug immediately?
Best regards, codezzly.
Dropzone
component should accept a child component just like the FileReader
There should be an option for returning both base64 and FileLists incase end services don't accept base64 files as an upload option.
Hi GrillWork,
thank you for this cool file-reader!
Would you be kind to help me with next:
My component configuration is next:
Device details:
Looking forward to hearing from you
Thank you
Could you change click event in a way to prevent default action?
https://github.com/GrillWork/react-file-reader/blob/master/ReactFileReader.js#L11
clickInput = (e) => {
e.preventDefault()
let element = document.getElementById(this.state.elementId);
element.value = '';
element.click();
}
I am trying to upload same .CSV file in row. Second upload of the same file doesn't work. As per the log it says version 1.1.2 has fixed this issue. but looks like its still broken.
It would be nice to be able to disable the component if needed. I'm currently attempting to implement it but have it disabled until another form element is completed. I can do this directly to the child <button>
element which effectively makes the button look disabled, but you can still click it to invoke the file uploader.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.