From 98a6ae44c510e4845c65381928bf25785866eb99 Mon Sep 17 00:00:00 2001 From: Shawn Date: Fri, 30 Nov 2018 02:13:52 -0600 Subject: [PATCH] Attempt to fix Facebook's browser file picker --- client/src/containers/Dropzone/view.jsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/client/src/containers/Dropzone/view.jsx b/client/src/containers/Dropzone/view.jsx index 7a4c02bd..ece1910b 100644 --- a/client/src/containers/Dropzone/view.jsx +++ b/client/src/containers/Dropzone/view.jsx @@ -46,6 +46,15 @@ class Dropzone extends React.Component { this.handleClick = this.handleClick.bind(this); this.handleFileInput = this.handleFileInput.bind(this); this.chooseFile = this.chooseFile.bind(this); + + this.fileInput = React.createRef(); + } + + componentDidMount() { + if(isFacebook) { + // See https://github.com/lbryio/spee.ch/issues/782 + this.fileInput.current.removeAttribute('accept'); + } } componentDidUpdate(prevProps) { @@ -200,11 +209,12 @@ class Dropzone extends React.Component { )}