aboutsummaryrefslogtreecommitdiff
path: root/islands/UploadButton.tsx
blob: a23766d15aa17c3251a47b6518510aff07776372 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import {JSX} from 'preact';

export default function UploadButton(props: JSX.HTMLAttributes<HTMLInputElement>) {

    return(
        <form action="/analyze" method="post" encType="multipart/form-data">
            <input 
            {...props}
            name="packagefile"
            type="file"
            accept={".json"}
            // onChange={getFileData}
        />
        <button type="submit">Submit</button>
        </form>
    );
}