Merge pull request #791 from lbryio/staging

Cut release
This commit is contained in:
Shawn K 2018-11-30 02:16:16 -06:00 committed by GitHub
commit 83022b4095
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,6 +46,15 @@ class Dropzone extends React.Component {
this.handleClick = this.handleClick.bind(this); this.handleClick = this.handleClick.bind(this);
this.handleFileInput = this.handleFileInput.bind(this); this.handleFileInput = this.handleFileInput.bind(this);
this.chooseFile = this.chooseFile.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) { componentDidUpdate(prevProps) {
@ -200,11 +209,12 @@ class Dropzone extends React.Component {
)} )}
<form> <form>
<input <input
ref={this.fileInput}
className='input-file' className='input-file'
type='file' type='file'
id='file_input' id='file_input'
name='file_input' name='file_input'
{...(isFacebook ? { accept: 'image/*' } : { accept: 'video/*,image/*' })} accept='video/*,image/*'
onChange={this.handleFileInput} onChange={this.handleFileInput}
encType='multipart/form-data' encType='multipart/form-data'
/> />