Merge pull request #27 from Coteh/main
Fix bug preventing file selection on iPhone 6 iOS 12.5
This commit is contained in:
commit
36f7595fca
|
@ -96,7 +96,7 @@ function Form(): JSX.Element {
|
||||||
// Add event listener to listen for file change events
|
// Add event listener to listen for file change events
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (inputFile && inputFile.current) {
|
if (inputFile && inputFile.current) {
|
||||||
inputFile.current.addEventListener('input', () => {
|
inputFile.current.addEventListener('change', () => {
|
||||||
let selectedFile = inputFile.current.files[0];
|
let selectedFile = inputFile.current.files[0];
|
||||||
if (selectedFile !== undefined) {
|
if (selectedFile !== undefined) {
|
||||||
setFileLoading(true);
|
setFileLoading(true);
|
||||||
|
@ -442,7 +442,7 @@ function Form(): JSX.Element {
|
||||||
|
|
||||||
<input type='file'
|
<input type='file'
|
||||||
id='file'
|
id='file'
|
||||||
accept="application/pdf,image/png"
|
accept="application/pdf,.png"
|
||||||
ref={inputFile}
|
ref={inputFile}
|
||||||
style={{display: 'none'}}
|
style={{display: 'none'}}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -48,7 +48,7 @@ function Page(props: PageProps): JSX.Element {
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src='shield4.svg' width='50' height='50' /></td>
|
<td><img src='shield4.svg' width='50' height='50' /></td>
|
||||||
<td style={{fontSize: 20, width: 280}}><span><b> Vaccination Receipt</b></span></td>
|
<td style={{fontSize: 20, width: 280}}><span style={{marginLeft: '11px'}}><b>Vaccination Receipt</b></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {PayloadBody, Receipt, HashTable} from "./payload";
|
import {PayloadBody, Receipt, HashTable} from "./payload";
|
||||||
import * as PdfJS from 'pdfjs-dist'
|
import * as PdfJS from 'pdfjs-dist/legacy/build/pdf'
|
||||||
import jsQR, {QRCode} from "jsqr";
|
import jsQR, {QRCode} from "jsqr";
|
||||||
import { getCertificatesInfoFromPDF } from "@ninja-labs/verify-pdf"; // ES6
|
import { getCertificatesInfoFromPDF } from "@ninja-labs/verify-pdf"; // ES6
|
||||||
import {COLORS} from "./colors";
|
import {COLORS} from "./colors";
|
||||||
|
|
Loading…
Reference in New Issue