diff options
Diffstat (limited to 'islands/UploadButton.tsx')
| -rw-r--r-- | islands/UploadButton.tsx | 17 | 
1 files changed, 17 insertions, 0 deletions
| diff --git a/islands/UploadButton.tsx b/islands/UploadButton.tsx new file mode 100644 index 0000000..a23766d --- /dev/null +++ b/islands/UploadButton.tsx @@ -0,0 +1,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>
 +    );
 +}
\ No newline at end of file | 
