-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'result' in FileReader has [object Object] instead of string after using upload method and reading file content #104
Comments
Just ran into this myself. The problem is that
|
Thank you, @justinlittman! You'll fix it for me! |
Hi @marekdano! And shout out to @justinlittman for quick help! |
I've put up a pull request to add @justinlittman! 🎉 |
Current behavior:
Desired behavior:
Thanks for creating this library. I like how clear is to use it to test upload file functionality.
I took the library to test uploading a JSON file, read the content in the file, set the state and display file content on the layout. I found while using this library, a JSON file uploads, FileReader executes, but the result returns [objectObject] instead of an expected string.
When I upload a file in the real app the FileReader result correctly contains a string which is a content of the uploaded file.
I'm not sure if there is a bug in the library or I missed something in my implementation which can be seen below.
Steps to reproduce: (app code and test code)
Please find the code that I use:
// implementation of file input
// implementation of handleUploadFile
// test
Versions
The text was updated successfully, but these errors were encountered: