-
Notifications
You must be signed in to change notification settings - Fork 387
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
FilePicker: How to read file content #444
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
Thank you for submitting your first issue to this project. |
Hi @mgordic, If you're not in IE or Edge, you can use Documentation: https://developer.mozilla.org/en-US/docs/Web/API/File |
Hi, Thank you for your reply. I need to support IE/Edge as well. Do you maybe have some code example? |
@hugoabernier do you have any examples of that? I believe, this one was created by you (correct me if I wrong). |
@AJIXuMuK as much as I'd like to take the credit for this control, it is based on a code sample I submitted to the WebParts samples repo. It appears that the code for this control is derived from one of my code sample in the https://github.com/SharePoint/sp-dev-fx-webparts repo. (I'd love to know who submitted the PR so that I can thank them directly though!) If you're using IE or Edge, you should have access to |
@hugoabernier it was Piotr Siatka @siata13 |
Hey, Now, the downloadFileContent method should return a promise with a File object in IE also. After that, you can simply use FileReader, e.g.:
|
The PR has been merged and will be available in the next build. Or you can test it in current beta version. |
Thanks @siata13 for doing this! |
Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your
needs please complete the below template to ensure we have the details to help. Thanks!
Please check out the documentation to see if your question is already addressed there. This will help us ensure our documentation is up to date.
Category
[ ] Enhancement
[ ] Bug
[x] Question
Version
Please specify what version of the library you are using: [ Latest ]
Expected / Desired Behavior / Question
How can I read file content on save, as array buffer or base64 encoded string?
downloadFileContent does not return anything of those.
Thank you
The text was updated successfully, but these errors were encountered: