Any file, not just images, may be uploaded.
This commit is contained in:
parent
0a1876b253
commit
5cdd6b8982
@ -15,7 +15,7 @@ const MultipleUploader = ({mutate}) => {
|
||||
}
|
||||
}
|
||||
|
||||
return <input type='file' accept={'image/jpeg,image/png'} multiple required onChange={handleChange} />
|
||||
return <input type='file' multiple required onChange={handleChange} />
|
||||
}
|
||||
|
||||
export default graphql(gql`
|
||||
|
||||
@ -15,7 +15,7 @@ const SingleUploader = ({mutate}) => {
|
||||
}
|
||||
}
|
||||
|
||||
return <input type='file' accept={'image/jpeg,image/png'} required onChange={handleChange} />
|
||||
return <input type='file' required onChange={handleChange} />
|
||||
}
|
||||
|
||||
export default graphql(gql`
|
||||
|
||||
@ -20,11 +20,11 @@ export default withData(props => (
|
||||
</Head>
|
||||
<h1>Apollo upload examples</h1>
|
||||
<Section heading='Single file upload'>
|
||||
<p>Select an image to upload and view the response in the console.</p>
|
||||
<p>Select an file to upload and view the response in the console.</p>
|
||||
<SingleUploader />
|
||||
</Section>
|
||||
<Section heading='Multiple file upload'>
|
||||
<p>Select multiple images to upload and view the response in the console.</p>
|
||||
<p>Select multiple files to upload and view the response in the console.</p>
|
||||
<MultipleUploader />
|
||||
</Section>
|
||||
<Section heading='Uploaded files'>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user